Chapter 17. Poseidon in Eclipse

Table of Contents
17.1. Installing Poseidon within Eclipse
17.2. Start Poseidon in Eclipse
17.2.1. New Eclipse Project, New Poseidon Model
17.2.2. Existing Poseidon Model
17.2.3. Existing Eclipse Project
17.3. Working with Projects
17.3.1. Importing Source Code
17.3.1.1. Roundtrip Import - Roundtrip is enabled
17.3.1.2. Normal Import - Roundtrip is disabled
17.3.2. Generating Source Code
17.3.2.1. Add Additional Source Directories
17.3.2.2. Generate Source Code with Roundtrip
17.3.2.3. Generate Source Code without Roundtrip.
17.3.3. General
17.3.3.1. Drag and Drop
17.3.3.2. Working with the UML Model outside of Eclipse
17.3.3.3. Saving the UML Model
17.3.4. Summary
17.3.4.1. Edit Projects with Roundtrip Engineering
17.3.4.2. Edit Projects with Roundtrip Disabled
17.4. Interface
17.4.1. Poseidon Entries in the Eclipse Toolbar
17.4.2. UML Menu
17.4.3. The Java Perspective
17.4.4. The UML Perspective

There are lots of ways to create UML projects and even more ways to write code, including standing at a whiteboard. But it isn't just a question of how to capture this information, it is what you can do with it once it has been created. Poseidon's integration into the Eclipse IDE means that the most intuitive UML tool can exchange data directly with one of the most flexible development environments. Code and model become integrated into one project.

Throughout the development process, both the UML model and the source code evolve and grow. Optimally, the two should always be synchronized. Previously this meant importing and exporting changes between tools based on a common denominator. Now with the push of a single button, Eclipse and Poseidon can seamlessly integrate the textual information that is Eclipse's specialty with the visual data Poseidon is expert at creating into one comprehensive project.

This is not a comprehensive guide to Eclipse, but highlights some of the more important features of Eclipse that are relevant to Poseidon. More information about Eclipse, including download mirrors, is available at the Eclipse Website . Full Eclipse Documentation is also available.

Much of the functionality of Poseidon within Eclipse is based on the Roundtrip Engineering that is available from the standalone version of Poseidon for UML. Many of the dialogs presented here are discussed in more detail in Section 14.1.3 . We suggest that you review this section before beginning with Eclipse.

Please note that Poseidon in Eclipse is available in the Professional Edition only.

17.1. Installing Poseidon within Eclipse

Installing the Poseidon Professional Edition for use within Eclipse is very simple. Before you begin, be sure that you have Eclipse correctly installed on your machine and that Eclipse is not currently running.

  1. Install Poseidon PE .x normally, as described in Section 3.3 . Start Poseidon.

  2. From the Poseidon Plug-Ins menu, select 'Install Eclipse-Bridge'.

  3. Select your Eclipse installation directory, then click 'Install'.

  4. A confirmation dialog will appear. Click 'OK'.

  5. Shut down Poseidon and start Eclipse.

If you do not have write permissions for the Eclipse directory, a new file will be placed in a temporary directory and you will be reminded to manually move this file into the 'links' directory under the Eclipse installation directory. Alternatively, you may run Poseidon with Administrator privileges.

Increasing Memory

To increase the memory available to Eclipse, start Eclipse by running " eclipse -vmargs -Xmx512m ", where the number 512 can be replaced with the amount of memory to be allocated to Eclipse. Providing more memory is recommended.

Running Linux

On Linux, Eclipse needs Java 5.0 to work properly. Set the environment variable JAVA_HOME to your Java 5.0 installation directory and make sure that the PATH environment variable contains $JAVA_HOME/bin . You can verify your Java installation by checking that the command " java -version " returns a text containing "build 1.5".

Importing files has changed in Java 5.0. The changes are outlined in Section 17.3.1 .