Poseidon for UML: User Guide
Prev | Chapter 6. Panes | Next

# 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 eight tabs:

- Properties

- C++ Properties (not available in CE)

- Style

- Source Code

- Documentation

- Constraints

- Tagged Values

The following sections investigate these tabs in greater detail.

## Selection Bar

Versions 2.4 and later now contain a selection and editing toolbar over the Details pane. This toolbar provides constant access to functions previously available only in the Properties tab.

The first set of buttons are the navigation buttons. The left and right buttons move you through the history of selected elements in a style very similar to a web browser. For example, if you select Package_1, then Class_1, then Class_2 and click the left arrow, you will arrive at Class_1. The up arrow moves you logically up to the next level of the model. Say Package_1 contains Class_2. Regardless of whether Package_1 was previously selected or not, clicking the up arrow while Class_2 is selected will move you to Package_1.

The next item displays the type of element currently selected. In the example above, this happens to be a package. When multiple elements are selected, this will display the generic message 'Elements' followed by the number of elements selected. At the same time, this becomes a dropdown list populated by the individual element types. You can select one of these element types from the list and your current selection will be refined to display only previously selected elements of the chosen type. For example, assume a diagram has 10 classes and lots of other elements. Say you select 4 classes and 2 actors. If you select 'Classes:4' from the dropdown, only those 4 classes remain selected. The other 6 unselected classes are irrelevant, and the 2 actors are de-selected.

The next two buttons delete items from the diagram, but each in a slightly different way. The delete icon is the red 'X', which completely removes the element from the project. All occurrences of this element are deleted, whether they appear in the current diagram or not. The second button removes the element from the current diagram only. The element remains available in other diagrams and in the Navigation pane.

The final set of buttons allow you to add elements to the current attribute. The elements available depend on the element selected. For classes, your options include adding attributes, operations, inner classes, and inner interfaces. Elements such as dependencies do not allow you to add any other elements.

## 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 6-3. 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 6-4. Drill-down navigation

## C++ Properties

The C++ functionality has been ported from the Embedded Edition. The available properties are dependent upon the element currently selected.

Figure 6-5. C++ tab for an association end

> Note: Not available in the Community or Standard Editions

## Style Tab

- Offers possibilities for defining colors and certain other display characteristics of selected elements

- Style can be changed for a single element, or for several selected elements at a time

Figure 6-6. Style tab for a class

The Style tab allows you to control the display of elements within a particular diagram. 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, text color, font, and font size. The display properties of an element exist only within that diagram, that is, if you give a font color to a class in one diagram, that font color will not be automatically applied to the other diagrams in which that element appears.

The display of compartments is also configurable from the Style tab. In general, the visibility of compartments (for those elements that have compartments, such as classes) is determined at the diagram level. But this can be altered for individual elements without affecting the rest of the elements in that diagram. Select the option "Specify individual compartment display" and enable or disable the appropriate checkboxes.

## Source Code Tab

- Available for different elements, based upon the target language selected

- Shows the code generated by Poseidon

Figure 6-7. 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 plug-ins and profiles. Each language must have both the plug-in 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.

## Documentation Tab

- Contains a WYSIWYG editor, where you can easily add your own documentation for model elements

- You can also use Javadoc tags, like `@author`, `@see` and others

Figure 6-8. Documentation tab for a class - WYSIWYG and source

The Documentation tab provides a mechanism for adding your own freeform text as well as supported JavaDoc tags to the generated code.

There are a couple of choices for entering text - you can use the WYSIWYG editor and format the text using the documentation toolbar, or you can edit in plain text mode and add html formatting tags by hand. Only HTML tags that are legal within <body> tags can be entered into the source code view. Both methods result in html-formatted text; for instance, pressing 'Enter' while in the WYSIWYG tab generates a new paragraph with the <p> </p> tags, and pressing 'Ctrl-Enter' generates the <br /> tag.

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.

While the WYSIWYG editor is a handy and convenient tool, it also slows the performance of Poseidon. The Settings | Appearance tab includes an option to turn off this editor, which removes the toolbar and editor selection tabs. The source editor remains in place.

### Toolbar

| Cut
| Copy
| Paste
| Undo
| Redo
| Search and Replace
| Align Left
| Align Center
| Align Right
| Bold
| Italic
| Underline
| Subscript
| Superscript
| Font Color
| Insert Default Table
| Insert Table
| Numbered List
| Bulleted List
| Decrease Indent
| Increase Indent
| Link to Model Element
| Insert Hyperlink
| Insert Bookmark
| Insert HTML
| Insert Span
| Insert Image
| Insert Text
| Insert Horizontal Line
| Insert Symbol
| Show All Formatting Characters
| Remove Formatting
| Open Style Properties Dialog
| Display Document Statistics

### Dropdowns

Paragraph Style |
Font Type |
Font Size |
Style Sheet |

## Constraints Tab

- Holds the constraints for the given element

Figure 6-9. New constraint in the Constraints tab

The UML does not include specifications regarding constraint language. Poseidon is now able to hold constraint information that is language independent, including plain English. Of course, you are still free to use OCL if you so choose.

## Tagged Values Tab

- Edit different pairs of names and values that you might want to use in order to enhance your model with specific characteristics.

- This is a general mechanism of UML that can be extended for special purposes

Figure 6-10. Documentation stored in the Tagged Values tab

If, for example, 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.

Tags may also originate from a stereotype. The tag is specified in the Properties tab of the stereotype. Whenever the stereotype is applied to an element, the tag and owner stereotype are populated in the Tagged Values tab.

Prev | Home | Next
Diagram Pane | Up | Overview Pane