Details Pane

The Details pane provides access to all of the aspect of the model elements. Within this pane, you can view and modify properties of the elements, define additional properties, and navigate between elements.

The pane is composed of six tabs:

The following sections investigate these tabs in greater detail.

Properties Tab

The most important tab is the Properties tab, which is selected by default. The Properties tab looks a little different for each different type of model element. So far in this tour we have selected packages, diagrams and classes. All of these elements have only one common property, the property 'name'. It makes sense that this would be the only field in this tab which is duplicated for all of the elements.

An important property, the zoom factor, becomes visible in the Details pane when a diagram name is selected in the Navigation pane. You can use the slider to change the zoom factor interactively or use the buttons to set it to pre-selected zoom factors (The range of zoom factors is limited in the Community Edition). To access this property, select a diagram in the Navigation pane or click on empty space in the Diagram pane.

Figure 10-2. Properties tab with Zoom

But the real power and importance of the Properties tab becomes apparent for complex model elements like classes or methods. For these, the Properties tab becomes an important tool to view and change the model details. As a general rule, properties that can be changed are placed to the left. On the right, related model elements are displayed. By clicking on the related model elements, you can navigate to them and change their properties. This way, you can drill down from a package to a class to a method to its parameters and so forth.

Figure 10-3. Drill-down Navigation

Style Tab

Figure 10-4. Style tab for a class element

If, for example, you wanted all your classes in a diagram to have fill color green you can select all the elements (using the mouse, or by pressing CTRL-A) and then use the color chooser to change their color to green. You can also change the line color. In addition, you can specify whether you want attribute or operation compartments to be shown or hidden.

To Do Items Tab

The To Do Items tab is not functional in this Beta version.

Documentation Tab

Figure 10-5. Documentation Tab for a class

The Documentation tab provides a mechanism for adding your own freeform text as well as supported JavaDoc tags to the generated code. This information is stored as tagged values and can be previewed in the Java Source tab. Any entries made via the editor on the left side of the tab are placed in paragraph tags by default and are displayed before the JavaDoc entries.

Source Code Tab

Figure 10-6. Source code tab for a class

At the start this code just represents the skeleton that has to be filled with content. For example, method names and the corresponding parameters may already present and defined, but the method body might still be empty. With most of the target languages, you can use this editor to fill in the body. With round-trip engineering you can also use any other external editor or IDE. Note also that documentation entered in the Documentation tab is included in the generated code.

The editor in Poseidon will not allow you to change all of the code. The sections of code which are highlighted in blue are 'read-only' in the Poseidon editor. Text highlighted in white may be edited, deleted, and appended. This functionality originates from a NetBeans project and is the result of a plug-in.

New in version 2.1 is the ability to select the target language of the source code. The list of available languages is dependent upon the list of enabled plugins and profiles. Each language must have both the plugin and profile specific to that language enabled.

The same diagrams may be used to generate code in different languages. Any code written in the 'your code here' sections is available only in the language selection in which it was written. For example, any code manually entered into the editable section of this tab while Java is the selected language will not be seen if the language is changed to C# or Perl.

Should there be ambiguity, a second dropdown will appear next to the language selection dropdown in order to determine the correct option for the implementation.

Constraints Tab

Figure 10-7. New constraint in the Constraints Tab

Since many people find OCL difficult to learn we have provided an assistant that helps you with the syntax of the OCL language. The syntax of the constraint and its consistency with the model can be checked for correctness.

Figure 10-8. Syntax Assistant in the Constraints Tab

Tagged Values Tab

Figure 10-9. Documentation stored in the Tagged Values Tab

For example, if you need special information for external processing of the model you can add this information here. This is also where Poseidon stores any documentation entered in the Documentation tab.