Changes between Version 41 and Version 42 of SetupEclipse


Ignore:
Timestamp:
Jul 15, 2015, 12:31:18 PM (5 years ago)
Author:
GaryM
Comment:

Updates

Legend:

Unmodified
Added
Removed
Modified
  • SetupEclipse

    v41 v42  
    1212== Set preferences ==
    1313
    14 '''Recommended approach:''' for recent eclipse versions (Ganymede onwards) we ship a preferences file in the Chaste trunk.  See source:trunk/eclipse_settings/README.txt for full instructions on using this, but in brief:
     14=== Recommended approach ===
     15
     16For recent eclipse versions (Ganymede onwards) we ship a preferences file in the Chaste trunk.  See source:trunk/eclipse_settings/README.txt for full instructions on using this, but in brief:
    1517 * File -> Import... -> General -> Preferences and select file `<path_to_chaste>/eclipse_settings/preferences.epf`
     18 * Now check that it has implemented them properly - it usually doesn't due to some bug, here is a workaround.
     19   * Select 'Show Whitespace Characters` there should be a button for this in the toolbar.
     20   * Now bring up any Chaste `.hpp` or `.cpp` file put the cursor somewhere and press `Tab`. You will see either:
     21     * Four dots `....` - Chaste settings have been applied - you are ready to go!
     22     * An arrow followed by spaces `>>    ` - settings aren't applied properly. In this case you then need to carry on with these instructions.
     23   * Go to Window->Preferences->C/C++->Code Style->Formatter.
     24     * You will see a box with `Chaste` as the Active profile, select a different active profile and press `apply`
     25     * Now re-select Chaste and click `Apply` then `OK`.
     26   * Repeat the `tab` test above, and you should now see four dots `....`, and Chaste settings have been applied correctly.
    1627
    17 If this is not possible, certain key preferences may be set manually.
     28=== For older eclipses ===
     29
     30If the above is not possible, since the menu's aren't there, certain key preferences may be set manually.
    1831 * You are advised to use visible tabs (so you can double-check tab settings).  Go to Window->Preferences->General->Editors->Text editors->Show whitespace->Configure visibility, then select checkbox for visible tabs (and trailing spaces).
    1932 * Use "Insert spaces for tabs" -- '''Please make sure you do this'''
     
    3043(Optional) See MakeEclipseBuildTheTestThatIsOpen to set up eclipse to allow you to run the currently open test
    3144
    32 === Unresolved include errors (red underlining) ===
     45== Unresolved include errors (red underlining) ==
    3346
    3447Sometime Eclipse pretends it has never heard of things like `std::vector` and so it underlines in red everything that uses them - so nearly all Chaste classes. This makes your scroll bar all red, prevents using F3 to get to definitions, and is generally very annoying. The solution is to:
    3548 1. Right click your project ("Chaste" by default) and select Properties
    3649 2. Navigate to "C/C++ General" -> "Code Analysis" -> "Preprocessor Include Paths, Macros, etc."
     50    * If you see "This project is not a CDT project" then you first need to select the Chaste project and do File->New->Convert to a C/C++ Project (as the CDT settings need updating for newer Eclipses), then carry on with these instructions...
    3751 3. Choose the "Providers" tab
    3852 4. Enable "CDT GCC Built-in Compiler Settings"
     
    4761 5. Enter Include Directories (like PETSc/include) and select "system headers", and define macros (like CHASTE_CVODE=1) to your heart's content.
    4862
    49 == Create a script to remove subversion id on starting Eclipse ==
     63== Create a script to remove subversion id on starting Eclipse (optional) ==
     64
     65If you are on a machine that lots of people are going to use for development work, you will want to remove any saved svn login details easily. If you aren't you can ignore this section.
    5066
    5167Create a file called ~/bin/eclipse containing the following:
     
    7086}}}
    7187
    72 == Add an Eclipse Icon (Optional) ==
     88== Add an Eclipse Icon (optional) ==
    7389
    7490Right click on the desktop and choose Create Launcher. Enter the following: