| 1 | = Tips on using Eclipse = |
| 2 | |
| 3 | 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. |
| 4 | |
| 5 | 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. |
| 6 | |
| 7 | === For Ubuntu === |
| 8 | The current version of Ubuntu includes Eclipse Indigo (version 3.7.2) and a package that provides the CDT plugin. Just type: |
| 9 | |
| 10 | {{{ |
| 11 | $ sudo apt-get install eclipse-cdt |
| 12 | }}} |
| 13 | |
| 14 | === For Tardis @ ETH === |
| 15 | I asked ISG to upgrade to the newest Eclipse Juno (version 4.2) and to pre-install the CDT plugin. It works well. |
| 16 | |
| 17 | === For everybody else === |
| 18 | '''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. |
| 19 | |
| 20 | 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. |
| 21 | |
| 22 | 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 >}}}'''. |
| 23 | |
| 24 | 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. |
| 25 | |
| 26 | == Make Orxonox an Eclipse project == |
| 27 | |
| 28 | 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: |
| 29 | |
| 30 | {{{ |
| 31 | $ cd ~/orxonox |
| 32 | $ ls |
| 33 | trunk |
| 34 | $ mkdir build |
| 35 | $ cd build |
| 36 | $ cmake -G"Eclipse CDT4 - Unix Makefiles" ../trunk |
| 37 | }}} |
| 38 | |
| 39 | This will create an Eclipse project in your build directory. |
| 40 | |
| 41 | == Import to Eclipse == |
| 42 | Open Eclipse and choose '''{{{File->Import}}}''', then '''{{{General->Existing Projects into Workspace}}}'''. |
| 43 | |
| 44 | 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. |
| 45 | |
| 46 | Press '''{{{Finish}}}''' and there you go: An Orxonox project in Eclipse with many of the nice features that a C++ IDE and Eclipse provide. |
| 47 | |
| 48 | == Setting up Eclipse for Orxonox == |
| 49 | Now that you have Orxonox in Eclipse you probably want to activate the C++ perspective in '''{{{Window->Open Perspective->C/C++}}}''' |
| 50 | |
| 51 | === Add a Run Configuration === |
| 52 | ''TBA'' |
| 53 | |
| 54 | === Hide all that junk in the Project Explorer === |
| 55 | 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. |
| 56 | |
| 57 | Go to '''{{{Project->Properties->Resource->Resource Filters}}}''' and choose '''{{{Add Group...}}}'''. In the new window choose '''{{{Include Only}}}''', '''{{{Folders and Files}}}''' and '''{{{OR}}}'''. |
| 58 | |
| 59 | Now add two filters within this group where name matches '''{{{[Source Directory]}}}''' and '''{{{bin}}}'''. |
| 60 | |
| 61 | Apply the filters and all but the two important directories are left. |