= Tips on using Eclipse = Eclipse is a complex IDE for Java and takes some time to get into. However its flexibility and the way Eclipse is easily extendable with plugins, makes it a powerful IDE for any software development. To use Eclipse to develop Orxonox you need to install C++ support for Eclipse. This is VERY easy as it is provided via the CDT (C/C++ Development Tooling) plugin. === For Ubuntu === The current version of Ubuntu includes Eclipse Indigo (version 3.7.2) and a package that provides the CDT plugin. Just type: {{{ $ sudo apt-get install eclipse-cdt }}} === For Tardis @ ETH === I asked ISG to upgrade to the newest Eclipse Juno (version 4.2) and to pre-install the CDT plugin. Be sure to start it with {{{ $ eclipse-4.2 }}} === For everybody else === '''Note:''' The CDT plugin requires at least Eclipse version 3.6 and some newer versions of the plugin require version 3.7. Be sure you have a recent enough version of Eclipse installed on your system. Open Eclipse and choose '''{{{Help->Install New Sofware...}}}'''. A window will open where you can add a repository for the CDT plugin. Enter '''{{{http://download.eclipse.org/tools/cdt/releases/juno}}}''' (or '''{{{indigo}}}''' or '''{{{helios}}}''' depending on your version of Eclipse) and press '''{{{Add...}}}'''. Give the repository a nice name and proceed. Eclipse will access the repository and provide you with a list of features the repository provides. Choose at least the '''{{{Main Features}}}''' and click '''{{{Next >}}}'''. Eclipse will now check the dependencies and if the plugin can be installed. If not it will provide a helpful error message. If yes, proceed and Eclipse will install the CDT plugin. Afterwards you will be asked to restart Eclipse. == Make Orxonox an Eclipse project == Since Eclipse doesn't like build directories as sub directories of the source directory you need to create your build directory on the same level as your source: {{{ $ cd ~/orxonox $ ls trunk $ mkdir build $ cd build $ cmake -G"Eclipse CDT4 - Unix Makefiles" ../trunk }}} This will create an Eclipse project in your build directory. == Import to Eclipse == Open Eclipse and choose '''{{{File->Import}}}''', then '''{{{General->Existing Projects into Workspace}}}'''. Navigate to your ''build'' directory and Eclipse will find a project with the name '''Orxonox-Debug@build''' or something similar, depending on your settings in CMake. Press '''{{{Finish}}}''' and there you go: An Orxonox project in Eclipse with many of the nice features that a C++ IDE and Eclipse provide. == Setting up Eclipse for Orxonox == Now that you have Orxonox in Eclipse you probably want to activate the C++ perspective in '''{{{Window->Open Perspective->C/C++}}}''' === Add a Run Configuration === ''TBA'' === Hide all that junk in the Project Explorer === As you see in the Project Explorer there are all our generated directories plus our source directory called ''[Source Directory]''. To avoid confusion if our source is in ''src'' or the ''[Source Directory]'' we should hide unnecessary folders and files. Go to '''{{{Project->Properties->Resource->Resource Filters}}}''' and choose '''{{{Add Group...}}}'''. In the new window choose '''{{{Include Only}}}''', '''{{{Folders and Files}}}''' and '''{{{OR}}}'''. Now add two filters within this group where name matches '''{{{[Source Directory]}}}''' and '''{{{bin}}}'''. Apply the filters and all but the two important directories are left. == Orxonox Code Formatting Style == In order to have a unified formation in all orxonox classes, add the orxonox style. * Click on '''Window -> Preferences''' * Select '''C/C++''' and its subitem '''Code Style''' * Click on '''Import''' and select the xml file attache here. * Click on '''Apply''' and '''Ok''' == Learn more about Eclipse == http://www.vogella.com/articles/Eclipse/article.html