- Plone 3 Products Development Cookbook
- Juan Pablo Gimenez Marcos F.Romero
- 598字
- 2021-08-06 17:05:59
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.
- 做好PPT就靠這幾招:圖解力+吸引力+說服力
- VMware虛擬化與云計算:vSphere運維卷
- Dreamweaver基礎與實戰教程
- 數字孿生體:第四次工業革命的通用目的技術
- Alice 3 Cookbook
- 中文版CorelDRAW X8基礎培訓教程(全彩版)
- SolidWorks快速入門教程(2022中文版)
- Autodesk Ecotect Analysis綠色建筑分析應用
- Excel 2013公式·函數與數據分析
- Origin 2022科學繪圖與數據分析
- CAD/CAM應用教程
- 構筑敏捷的開發團隊:微軟Visual Studio 2010實戰兵法
- Web Host Manager Administration Guide
- 新手學UG NX 8.0輔助設計
- AI繪畫大師:Stable Diffusion快速入門與實戰技巧