Configuring ArgoUML
ArgoUML runs on any Java platform. If you don't have it yet, install JRE version 5 or higher.
Note
Installation details can be found at http://argouml-stats.tigris.org/documentation/quick-guide-0.28/ch02.html.
The first step in using ArchGenXML from a UML model is to associate a proper profile (with widgets, fields, and stereotypes information) to the UML application.
Getting ready
To get an ArchGenXML profile with all the information we'll use during Plone models generation, we can:
- Download it from http://svn.plone.org/svn/archetypes/ArchGenXML/trunk/umltools/argouml/archgenxml_profile.xmi
- Generate it with our just installed ArchGenXML application. The following command will create an
archgenxml_profile.xmi
file in the./bin
folder:~/libexec/argchgenxml/bin/agx_argouml_profile
Whatever method you choose, move the profile file to a new
profiles
folder insidearchgenxml
.Another better choice is to generate the profile file automatically during ArchGenXML buildout. If you want to, just modify your ArchGenXML
buildout.cfg
file: - Add a new
agx-profile
line to theparts
definition at the top of the file:[buildout] parts = ... agx-profile
- And then include the new
[agx-profile]
part definition at the bottom of the file:[agx-profile] recipe = iw.recipe.cmd on_install=true on_update=false cmds = mkdir ${buildout:directory}/profiles cd ${buildout:directory}/profiles ${buildout:directory}/bin/agx_argouml_profile
The iw.recipe.cmd
recipe runs arbitrary shell commands—the ones listed after the cmds
parameter.
The on_install
and on_update
parameters tell the recipe when it must be executed.
How to do it…
To associate the just generated profile to ArgoUML, we have to add it as a default profile for all upcoming projects, and then change a property in every new project.
Let's edit ArgoUML general settings:
- Launch ArgoUML.
- Go to the Edit | Settings menu option, and then to the Profiles section.
- In the Default XMI Directories list, click on the Add button, then browse to the
profiles
folder and select it. - Click on the OK button and restart ArgoUML.
- Again go to the Edit | Settings menu option, and then to the Profiles section.
- You'll now see a new AGXProfile option in the Available Profiles list; select it and click on the >> button to include it in the Default Profiles list.
- Remove any other profile in the Default Profiles list, except UML 1.4 (you can't remove it from Profile Settings).
Every time you create a new project, you have to modify the per-project properties as follows:
- Go to the File | Project Properties menu option, and then to the Profiles section.
- Select the UML 1.4 option in the Active Profiles list on the right; then click on the << button to make it inactive.
- Make sure there is no other profile set as active except AGXProfile.
- Click on OK to save these settings.
How it works…
By leaving just AGXProfile
in the Active Profiles list, we make sure no other stereotypes, data types or tags will be available in ArgoUML except the ones we need for ArchGenXML. This will save us from mistakes like typos, or using data types that are not really useful for a Plone project. Moreover, this will give us the chance of learning by seeing tags that we didn't know existed.
Due to a restriction in ArgoUML, we can't remove the UML 1.4 profile from the Active Profiles list in the Settings window. That's why we leave it in Step 1 and then we finally remove it in Step 2, in the project-specific properties.
Once we have applied all these changes, we should see the left-hand navigator as in the screenshot below:
There's more…
For more about ArgoUML configuration, see Plone's Developer Manual at: http://plone.org/documentation/manual/archgenxml2.