Eclipse configured for multiple languages

I use the Eclipse platform for Java, javaEE, C ++, python and PHP - in various school projects. Now that I'm a little more confident about this, I would like to get more accurate instructions on how to set it up. I am on windows7 - I myself threw eclipse into my Dropbox and created workspaces as needed, but this turned out to be in the chaos of settings common here and there, and in various errors (that appeared when I tried to update Juno - now functions like templates violated ).

So what is the recommended way to configure eclipse for different languages? Do I need to download the latest version, add the plugins I need (cdt, pdt, etc.), and then create different workspaces for different languages ​​(for example, eclipse_python, eclipse_java, eclipse_javaEE, etc.)? How to install eclipse up?

+5
source share
1 answer

I have been using eclipse intensively for about 6 years, and I would recommend setting up a separate eclipse setting for 1 or 2 different programming languages. The reason is that with too many plug-ins, eclipse can consume too much memory or processor time (of course, depending on what plugins do in the background, etc.), which can lead to an unresponsive interface.

eclipse, / .

script, .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
+4

All Articles