Eclipse中设置了多国语言(Eclipse set up for multiple langua

2019-07-30 16:35发布

我一直在使用的Java,JavaEE的,C ++,Python和PHP Eclipse平台 - 在不同的学校项目。 现在,我更舒服一点,我想就如何将它设置一些更准确的说明。 我对Windows7的 - 我已经放弃了Eclipse本身在我的Dropbox和创建为需要工作区,但该结束了在这里和那里蔓延设置的混乱和各种错误(这表明,当我尝试更新朱诺 - 现在拥有喜欢的模板被破坏 )。

那么,什么是设置了日食各种语言的推荐的方法? 我应该下载最新的版本,加上我需要的插件(CDT,PDT等),然后为不同的语言不同的工作区(如eclipse_python,eclipse_java,eclipse_javaEE等)? 如何设置Eclipse的吗?

Answer 1:

我一直在使用Eclipse的集中约6年了,我建议你最多1种或2个不同的编程语言设置单独的Eclipse安装。 其原因是,有太多的插件,日食可能会占用过多的内存或处理器的时间(当然,这取决于插件做背景等...),这可能会导致无响应的UI。

我还建议使用单独的工作区对于每个蚀安装,使得不同的配置/安装不相互干扰。

我写了一个小的命令行脚本,让我来切换.metadata目录用于便携式驱动器使用工作区(支持两种模式:家用和便携式)也许有人认为有用...

@ECHO OFF

REM This Script is used to ease using eclipse in a portable manner
REM The script allows to easily switch between several workspace metadata

REM arg1: eclipse runnable
REM arg2: workspace dir
REM arg3: metadata mode (portable or home)

:CHECK_ARG_ONE
IF %1 == "" GOTO :HELP
IF /i %1 == "/h" GOTO :HELP
IF /i %1 == "/?" GOTO :HELP
IF /i %1 == "/help" GOTO :HELP
IF /i %1 == "-h" GOTO :HELP
IF /i %1 == "-?" GOTO :HELP
IF /i %1 == "-help" GOTO :HELP
IF /i %1 == "--h" GOTO :HELP
IF /i %1 == "--?" GOTO :HELP
IF /i %1 == "--help" GOTO :HELP


:CHECK_ARG_TWO
IF %2 == "" GOTO :ERROR_ARG_TWO


:CHECK_ARG_THREE
IF %3 == "" GOTO :ERROR_ARG_THREE


:PREPARE
SET "ECLIPSE_RUNNABLE=%1"
SET "WORKSPACE_DIR=%2"
ECHO Working Dir: %CD%
ECHO Eclipse Runnable: %ECLIPSE_RUNNABLE%
ECHO Workspace Dir: %WORKSPACE_DIR%
SET "MD=.metadata"
SET "MD_HOME=.metadata_home"
SET "MD_PORTABLE=.metadata_portable"
PUSHD %WORKSPACE_DIR%
IF /i %3 == home GOTO :HOME
IF /i %3 == portable GOTO :PORTABLE
GOTO :ERROR_ARG_THREE_WRONG


:HOME
ECHO Starting home version
IF EXIST %MD% (
    IF EXIST %MD_HOME% (
        IF EXIST %MD_PORTABLE% (
            GOTO :ERROR_MD_PORTABLE_EXISTS_ALREADY
        ) ELSE (
            REN %MD% %MD_PORTABLE%
            REN %MD_HOME% %MD%
        )
    )
) ELSE (
    IF NOT EXIST %MD_HOME% (
        GOTO :ERROR_MD_HOME_EXISTS_NOT
    ) ELSE (
        REN %MD_HOME% %MD%
    )
)
GOTO :RUN


:PORTABLE
ECHO Starting portable version
IF EXIST "%MD%" (
    IF EXIST "%MD_PORTABLE%" (
        IF EXIST "%MD_HOME%" (
            GOTO :ERROR_MD_HOME_EXISTS_ALREADY
        ) ELSE (
            REN "%MD%" %MD_HOME%
            REN "%MD_PORTABLE%" %MD%
        )
    )
) ELSE (
    IF NOT EXIST "%MD_PORTABLE%" (
        GOTO :ERROR_MD_PORTABLE_EXISTS_NOT
    ) ELSE (
        REN "%MD_PORTABLE%" %MD%
    )
)
GOTO :RUN


:ERROR_ARG_TWO
ECHO No second argument supplied (workspace dir)
GOTO :END_ERROR


:ERROR_ARG_THREE
ECHO No third argument supplied (metadata mode - home ^| portable)
GOTO :END_ERROR


:ERROR_ARG_THREE_WRONG
ECHO Supplied third argument (metadata mode) must match (home ^| portable)
GOTO :HELP


:ERROR_MD_HOME_EXISTS_ALREADY
ECHO Trying to rename "%MD%", but the metadata directory "%MD_HOME%" already exists!
GOTO :END_ERROR


:ERROR_MD_HOME_EXISTS_NOT
ECHO Neither "%MD%" nor "%MD_HOME%" exist!
GOTO :END_ERROR


:ERROR_MD_PORTABLE_EXISTS_ALREADY
ECHO Trying to rename "%MD%", but the metadata directory "%MD_PORTABLE%" already exists!
GOTO :END_ERROR


:ERROR_MD_PORTABLE_EXISTS_NOT
ECHO Neither "%MD%" nor "%MD_PORTABLE%" exist!
GOTO :END_ERROR


:HELP
ECHO.
ECHO Eclipse starter script to switch between home and portable metadata
ECHO ©Till Kolditz 2011 (till.kolditz@googlemail.com)
ECHO.
ECHO This Script is used to ease using eclipse in a portable manner.
ECHO It allows to easily switch between portable and "home" or stationary
ECHO workspace metadata.
ECHO.
ECHO Usage: run.bat (eclipse_runnable) (workspace_dir) (home ^| portable)
ECHO.
ECHO Example1: run.bat eclipse\eclipse.exe workspace home
ECHO Example2: run.bat "eclipse (x64)\eclipse.exe" workspace_special portable
GOTO :END


:RUN
POPD
START "Eclipse" %ECLIPSE_RUNNABLE% -data %WORKSPACE_DIR%
GOTO :END


:END_ERROR
POPD
REM PAUSE for debugging
PAUSE
GOTO :END


:END
GOTO :EOF


文章来源: Eclipse set up for multiple languages