UML Output
Generate an XML file for graphing your application via Eclipse UML2Tools
Last updated
Generate an XML file for graphing your application via Eclipse UML2Tools
Last updated
UML2 Tools hasn't been developed for Eclipse since 2008. This strategy is now more for reference than anything else.
This is a documentation strategy that ultimately lets you generate UML diagrams from the CFCs that you have written. That being said, it does not actually generate diagrams.
What this template startegy does is generate the XML file the Eclipse UML2 Tools that stores the information about your domain - the classes, the associations, the inheritence hierarchy, etc. From there it is very easy with UML2 Tools to generate UML diagrams like Class Diagrams, Sequence Diagrams, etc.
To get started, you need to download and install the Eclipe plugin UML2 Tools in your Eclipse install.
We are actually going to use the 0.9.1 Integration Builds plugin, simply because it is more stable, and has several key bug fixes.
Download the All-In-One Update Site and save the .zip file
In Eclipse, go to Help > Install New Software
Click Add
Enter the name UML2 Tools in Name
Click Archive and select the .zip file you downloaded.
1 . Click OK, and continue through the installation process
Once that process is complete, the Eclipse UML2 Tools plugin should now be installed and working.
To get DocBox to generate the .uml
file that UML2Tools needs, we use the UML
strategy. For example:
This will generate the .uml
(in this case docbox.uml
) file which we can then use.
To view and edit the UML diagrams from here:
Browse to the .uml file that you generated in the Navigator Pane
Right click on the .uml file
Select Initialise Class Diagram
Select the root package that you wish to model
Click OK
You will now be presented with a UML Class diagram of your CFC model.
There are other types of UML2 diagrams that can be created. Have a look at the UML2 Tools documentation for more options.
There are some assumptions that are made by this strategy, when converting from CFCs to UML diagrams, as some meta data on CFCS are not provided and/or cannot be specified.
A property/field is determined for a class when a get and set function exist with the same name (or set and is for boolean values) and the argument type of the set function matches the return type of the get/is function.
The scope for the property/field is selected by highest level of exposure between the get and set functions. I.e. if getFoo() is public, and setFoo() is private, then the property foo is marked as public.
All associations are of type aggregation, rather than composition