The JAR Import Plug-in supports reverse-engineering and importing JAR archives into an existing model in Poseidon for UML. You can use and extend existing packages or frameworks in your own models, or browse and learn existing APIs. This feature is often requested by professional developers, for instance, to get a more vivid visualization of APIs than a standard Javadoc might provide.
With the RoundTrip UML/Java Plug-in you can generate Java code from your UML model, edit your code, reverse-engineer your code and synchronize with the model. This is especially interesting with tight integration in an IDE like Forte. Modeling and coding are not separated anymore.
With the Statechart-to-Java Plug-in you can directly generate java code from a UML state diagram that describes the behavior of a class. So in addition to the static structure of the class — i.e. operations, attributes and associations — the dynamic behavior is generated as java code.This unique module enables you to visualize, test and even manipulate the behavior of objects using their corresponding state diagrams. The visualization is based on pure UML, just adding some color and action.
The triggers in the state chart are mapped to ordinary operations of a class. The behavior of these operations is determined by the actions that are specified in entry and exit actions of states and as effects of transitions in state charts.
In order to validate the semantics of the specified behavior, the Statechart-to-Java Plug-in allows you to run a simulation in which state diagrams can be instantiated. The generated java code of a class assures that by creating an object that owns a state chart, its state chart diagram is simulated graphically. You can send triggers to these objects and step through the various states that are defined in the state chart diagram. By dealing with several objects, you can validate not only the intra-object behavior of one object, but also the inter-object behavior.
OCL code generation can immensely enhance your productivity using Poseidon. This module is particularly beneficial to development teams who make excessive use of UML and OCL. It also works very well for small and medium projects, if the developers already “speak” OCL fluently.
The refactoring browser module is the latest extension of the cognitive support for Poseidon. It provides a very handy set of functions to change the structure of your design for the better, without changing the functional outcome. The refactoring is actively assisted according to acknowledged rules, so that with bigger projects you still don't run the risk of side effects that ruin hitherto working models.
To put it in a nutshell, refactoring your program means cleaning up your program's internal structure without implementing new features or introducing side effects. The term "refactoring" was coined by the famous thesis “Refactoring Object-Oriented Frameworks" by William Opdyke in 1992. Nowadays, refactoring is an important practice within eXtreme Programming (XP). In contrast to the popular saying "Never change a running system", XP advises developers to routinely refactor their programs in order to prevent them from deteriorating. Further information about refactoring in general can be found on Ward Cunningham's extraordinary Wiki-Web.
To refactor a program, you don't need a tool as everything may be done manually. But a dedicated tool can save you a lot of time (and trouble) by automating much of the work and relieving you of tedious routine checks. The aim of the "Refactoring Browser for Poseidon" is to aid developers in refactoring not "just" code but also UML models. Currently 13 refactorings for class, state, and activity diagrams are supported — with far more to come.
Using the Refactoring Browser is easy. Every time you select a model's element, the browser checks its list of refactorings. If a refactoring is applicable for the current selection, you may select and customize it. Before performing the refactoring, the browser issues warnings if the refactoring is likely to alter your model's behavior. Error messages are generated if a modification will result in a defective model. You perform the refactoring with a final click of the mouse.
The MDL Import Plug-in enables Poseidon to import UML models created by Rational Rose.
After the plug-in has been installed, the
dialog (accessible from the menu or by clicking the icon in the toolbar) allows you to select the file type *.mdl. Unlike jar and java import, the current model is discarded and you cannot add a Rose model to your current model. You can set the scaling factor by entering a different value into the text field below the general information about the plug-in (see Display Issues). By default, the import plug-in hides the package information in Class Diagrams — long package names tend to ruin the diagram layout. If you want package names to be displayed in classes and interfaces, you may activate the check box.This version of the import plug-in reads class, state, activity, usecase, and sequence diagrams. The other diagram types will be incorporated in the next release.
Some elements are changed during the import, others are ignored completely. Here is a list of known shortcomings:
Poseidon currently supports notes for classes, interfaces, packages, use cases, actors and states, but not for transitions, associations or objects. If a note is not supported, it is added to the diagram as ordinary text.
Metaclass: Poseidon does not support meta classes, these classes are imported as ordinary classes.
Association Class: Association classes are imported, but not displayed correctly: They appear as simple associations. If you click on an association class, the Details pane displays the properties correctly, though.
Synchronization States: Rose does not discriminate between fork and join states. There is no way of telling how to map synchronization states — this plug-in currently always assumes fork states if the number of outgoing transitions is bigger than one. You are informed about the decision.
Subsystems: Subsystems are treated as packages — Poseidon does not support subsystems at the moment.
The following features are (at the moment) not being imported at all. You will get a warning after the import is complete that these elements will be missing.
Destruction Markers
Swim lanes
References: MDL files support references to other files (*.jar or *.cab files, for example). This import tool ignores references, no warning is issued.
Other problems: Some older versions of Rose have a bug in sequence diagrams: Links between objects have a wrong target ID. These links will not be resolved correctly by this plug-in — you will get an error message. Rose does the resolving by name instead of by ID, which seems rather error-prone, so we do not try to do this. Loading and saving the model with a new Rose version like Rose 2000 solves the problem, and the sequence diagram can be correctly be imported.
MDL files contain information about the diagram layout. The import plug-in reads the diagram elements coordinates and positions the diagram elements accordingly. A few things should be considered, though. Poseidon uses "smaller" coordinates than Rose. In general, scaling down the coordinates by 40 percent does the job — the diagrams almost look like they did in Rose. You can change the value in the Configuration tab to the right. If you choose 80%, for example, the diagram elements are further apart (but not bigger!) — making it easy to add comments or further elements.
While the coordinates are read from the MDL file, the sizes of diagram elements are dependent on the information being displayed. For example, a classes size depends on the length of the contained methods names and parameters. Long names or lots of parameters may lead to overlapping classes. To solve this, you can either select a higher scaling factor, or (at least for Class Diagrams) you can can edit the display options (select menu item
, and click the tab ).Sequence Diagrams
Poseidon performs an automatic layout of sequence diagrams — layout information contained in MDL files is ignored. Objects are currently placed arbitrarily, you might have to re-arrange them and any associated textual information. Apart from that, Rose allows activations to have arbitrary length, while Poseidon calculates the length of activations depending on the stimuli sent. Using the right mouse button, you can force an object to remain activated after the last message was sent.
We did extensive testing, and any problems during import should be signaled. But before you use and extend an imported file for production work, you should check your models and diagrams in case some model element was forgotten. If you experience problems or want to request additional features, do not hesitate to contact us at <support@gentleware.com>