Changes between Initial Version and Version 1 of EclipseAndMoleCuilder


Ignore:
Timestamp:
Feb 25, 2010, 11:47:05 AM (15 years ago)
Author:
FrederikHeber
Comment:

Added complete description of project setup

Legend:

Unmodified
Added
Removed
Modified
  • EclipseAndMoleCuilder

    v1 v1  
     1= Using Eclipse when developing for MoleCuilder =
     2
     3Eclipse Galileo with the following extensions are ideal for working on MoleCuilder:
     4   * CDT >6.0.0
     5   * ECUT >1.0M3
     6   * Eclipse Git >0.5.0
     7
     8== Configuring CDT ==
     9
     10We want to create a new project by cloning the git repository from the server that also contains this TRAC.
     11
     12Sadly, Eclipse git does not yet contain functionality to do this. Hence, have a look at GettingStarted to create the project in a folder in the eclipse workspace. Right-click in a free spot in the project explorer, select '''New''', there '''C/C++''' and and finally '''GNU C Autotools Project'''. Click '''next'''. Enter the folder name as the project name, click '''next''' twice, then '''finish'''.
     13
     14Right-click on this new project in the project explorer, select '''Properties'''. We go through each item on the left-hand list and list the necessary changes:
     15
     16=== C/C++ Build ===
     17
     18In the '''Behaviour''' tab for '''Build''' enter ''all install'' for '''Clean''' enter ''clean''. make sure '''Build on resource save''' is deactivated. Make sure that under the '''Builder Settings''' tab that ''Generate Makefiles automatically'' is activated. Otherwise generation via the autotools process of Makefiles is deactivated!
     19
     20   * '''Settings''': You might prefer ''Delete build directory'' over ''Use make target'' as the Clean Behaviour, as ''make distclean'' breaks sometimes if the Makefile is wrongly changed. On the '''Tool Settings''' tab, under '''Directory specifiers''' for '''Arch-independent install directory (--prefix)''' enter a subfolder of your home directory (i.e. /home/<yourname>/install) or use ${workspace_loc:/espack_jupiter/build64} for the build directory. Under '''Features and packages''' enter ''--enable-hydrogen'' ... (and ...'' --enable-cut'' if Ecut is activated, see below).
     21   * '''Environment''': Add CFLAGS and CXXFLAGS both with values '''-Wall -g3 -O''', to enable maximum warnings during compilation.
     22
     23=== C/C++ General ===
     24
     25   * '''Code Style''': You may wish to download the code style xml-file from [here CodingGuidelines] and import it here.
     26   * '''Indexer''': If eclipse feels very slow, you may wish to change the indexer here. The indexer is responsible for getting you to the right place if you strg-click on a function name or for the tooltips if you hover over a variable or function. Usually '''Fast C/C++ Indexer''' is sufficient.
     27   * '''Paths and Symbols''': Under the '''Source Location''' tab enter molecuilder/src (and also pcp/src and util/src as part of ESPACK), remove the default project folder.
     28
     29=== Task Repository ===
     30
     31The Task repository incorporates the ticket system of TRAC into eclipse.
     32
     33Click '''Add Task repository''', select ''Trac'', enter the default URL of the TRAC, use a sensible label. You have to deactivate ''Anonymous'' enter your user name. Use '''Validate Settings''' to check whether it is working.
     34
     35== Configuring ECUT ==
     36
     37Right-click on the project in the project explorer to get the context menu, select '''Ecut'''. Select '''Apply Connector'''. Select the ''!CppUnit Connector'', select ''Create build configuration''. Click '''finish'''. Note: if for ''Create build configuration'' the presence of the same-named configuration is admonished, just select '''No build configuration'''.
     38
     39Two new files should have appeared in the main folder of the project: ''!TestRunnerClient.cpp'' and ''!TestRunnerClient.h''. See above for adding ''--enable-ecut'' to the configure command line and use '''clean project''' and then '''build project''' in context menu of project to re-compile.
     40
     41Under '''Binaries''' in the project explorer a new file called ''!TestRunnerClient'' should have appeared. This file contains all Test cases in a single run.
     42
     43Finally, we configure a run configuration for this new executable. Select '''Run''' from the menu and '''Run Configurations'''. Select ''!CppUnit'' in the list on the left. Click on the '''new launch configuration''' in the icon list above. Give the test a decent name, select your project, use the build configuration you created above (!CppUnitTest) and finally '''Search Project''' for the new executable. Click '''Apply''' and '''Run'''.
     44
     45A new tab should appear called !CppUnit with an icon featuring a green letter C and a red letter U. Therein, the errors of the tests are listed. A green bar indicates whether everything ran fine. The green start button re-runs the test executable.
     46
     47Hence, you can re-run tests easily within eclipse to check whether your new code has not broken anything.
     48
     49== Configuring Eclipse Git ==
     50
     51Right-click on the project in the project explorer to get the context menu, select '''Team'''. Select '''share project'''. Select ''Git'', click '''Next''' then click on the single line showing a ".git" repository. Click '''finish'''.
     52
     53Eclipse should now display the current branch in square brackets next to the project name in the project explorer. Furthermore, in the context menu, in the '''team''' subitem you find items such as '''Commit''', '''Branch''', '''!ResetTo''', ... resembling some of commands of git for easy use inside eclipse.
     54