HomeDownloadsUser GuideDevelopmentLegal

Development: Eclipse Primer

Eclipse IDE

This document gives a short introduction to the IDE Eclipse.

To use the Eclipse IDE several preferences should be set correctly. If you are using a different editor or IDE you should try to set this programs preferences similar to the guidelines described on this page.

Eclipse Version

Basically the version of the Eclipse IDE you use does not matter. However versions 2.x contain several bugs that make it worth to switch to version 3.x.

The project files in the repository as well as the code templates and the coding style are built for Eclipse 3.2.x.

Preferences

Default Runtime Environment

The project relies on a JavaSE 6 or higher.

As of version 3.2 Eclipse supports "Execution Environments". This project makes use of this feature by using the JavaSE 6 execution environment.

It appears that if a runtime environment is added using the "Browse..." button in the "Installed JREs" preferences section the tools.jar of the JDK does not get added automatically.
Make sure the tools.jar of your JavaSE 6 is included in the runtime environment (default path is lib/tools.jar) and add it manually if it is not. Some of the implementation sources rely on it...

File Encodings

Please try to stick to "ISO-8859-1" (also known as "ISO-Latin-1") file encodings. The default file encoding may be set in the preferences on the tab General -> Workspace -> Text file encoding.

Line Delimiters

Try to use "Unix" line delimiters. The default line delimiter may be set in the preferences on the tab General -> Workspace -> New text file line delimiter.

Coding Style

This project uses a project specific coding style. This includes custom templates, formatter and import rules.

Please try to use the code formatter sparingly, esp. when it comes down to breaking long lines the results of the formatter are not very pleasing. Therefore do not format existing code.

CVS Preferences

File Content

Eclipse has its own table to figure out whether a file should be treated by CVS as text or binary file. In this table three file extension that are important in our project are missing: dtd, xslt, xsd are among them (there are probably others...).

To configure Eclipse for these file extensions go to the preferences tab Team -> File Content and add the following manually:

Extension Content Description
cmd ASCII Windows command
sh ASCII Unix shell script
css ASCII Cascading stylesheet
js ASCII Java script
xslt ASCII XML stylesheet
mm ASCII Mind map (XML file)
Ignored Resources

The following changes have been made to the ignored resources known by Eclipse (see preferences tab under Team -> Ignored Resources):

Extension Change Description
*.so Removed from list Unix shared objects (our shared libraries are part of the master)
*.jbf Added to list Thumbnail database used by various paint programs
.xvpics Added to list Thumbnail database used by various paint programs

Built-in Ant Support

Eclipse features a nice built-in Ant support (see Window -> Show View -> Ant) that allows to execute builds directly from within Ant.

Run Ant builds with an external JRE to prevent problems.