ALIs

kommt noch

Eclipse CDT: An Integrated Development Environment

Introduction and Features

According to the developers, "the Eclipse Platform is an IDE for anything, and for nothing in particular". It can be tailored to suit different development needs, by means of exchangeable plug-in sets. The Eclipse CDT (C/C++ Development Tools) installed at LRZ is such a specialization, and provides an IDE for C/C++ development, as well as keeping the (generic) support for developing Java applications and Eclipse plug-ins, since Eclipse itself is programmed in Java.

Main features of the Eclipse CDT include:

  • C/C++ Editor (basic functionality, syntax highlighting, code completion etc.)
  • C/C++ Debugger (using GDB)
  • C/C++ Launcher (APIs & Default implementation, launches and external application)
  • Fortran support via the Photran plug-in
  • Search Engine
  • Content Assist Provider
  • Makefile generator
  • Graphical CVS or SVN management

There are plans at LRZ to install and support additional Eclipse toolkits as these become available.

Running Eclipse CDT at LRZ

To access the Eclipse CDT installations, please load the appropriate environment module, typically:

module load eclipse

After this, issuing the command eclipse will start the GUI.

Customization Note: Eclipse needs a workspace directory to store configuration settings and project files. By default, the directory $HOME/eclipsews is used. You can always switch workspaces from inside Eclipse. If you want to change the default to, say, $HOME/mydir, create a file $HOME/.eclipserc containing the line

DEFAULTWORKSPACE=$HOME/mydir

First Steps

At first launch, Eclipse will show an introduction screen offering a number of documentation and training material. You can always go back to this screen by selecting Help->Welcome.

  1. Tutorials are short but useful for getting familiar with the interface. 
    • Java tutorials are integrated in the GUI and may be instructive even if don't plan to develop in Java. 
    • C/C++ tutorials guide you trough the process of project creation etc. by means of screenshots on an external web browser. In case you wonder, the difference between Standard Make and Managed Make is basically that the latter lets Eclipse generate the Makefile, whereas in the former you have to edit it by hand. Don't get confused if things on your screen do not look exactly like the screenshots.
  2. Overview provides links to the extensive Eclipse and CDT documentation.
  3. Samples may be of lesser interest because they are mostly concerned with Eclipse plug-in development (in Java).
  4. Press Workbench to get to the main screen.
  5. If you plan to create a project from scratch, or import existing sourcecode into CDT, please follow the instructions of the corresponding Tutorial.

Special case concerning CVS

If you plan to use CVS for versioning your project, set up the CVS repository and check in the files before you enter Eclipse. Then, within Eclipse, instead of File->New select

Window->Open Perspective[->Other...]->CVS Repository Exploring. 

The same applies if your source code is already contained in a CVS repository. Then,

(right click below CVS Repositories tab on the left)->New->Repository Location

enter the required repository information into the top four fields and click Finish. This will enable you to browse through your repository. Find the folder containing the sources you want to import, then

(right click on folder)->Check out as...->Check out using New Project Wizard[->Next->(select desired tag to check out)]->Finish

This will leave you at a stage similar to the one after File->New. Please take it from there, following the appropriate Tutorial and/or the on-screen instructions.

Random notes and hints

  • Do not use special characters like ä,ö,ß in the sourcecode - this will knock out the language parser
  • Files can be converted from UNIX to DOS or Mac and back via File->Convert Delimiters To...
  • If you are missing a specific Eclipse plug-in of which you heard and which you deem useful, contact the sysadmins.
  • Configuring a browser for the online documentation: If you get an error message which indicates that no browser can be found, please go to Window->Web Browser and select Konqueror.

Further Documentation

Eclipse Online help  - already very comprehensive
Eclipse Website - tons of information, forums, technical articles etc.
The Photran incubator project - with usage hints
The CDT User Guide - extensive description of CDT features, partly also applicable to Fortran development
CVS introduction (PDF) - intro chapter of the popular O'Reilly book