Login | Register
My pages Projects Community openCollabNet

User Documentation

ArgoPrint is a template-based documentation generation plugin for ArgoUML. It is designed to generate project documentation artifacts such as requirements and design documents from an ArgoUML model.

The following sections describe how to install and use ArgoPrint.


To install ArgoPrint, unzip the argoprint.zip file into your $ARGOUML_HOME/ext directory where ARGOUML_HOME is the directory where you previously installed ArgoUML. When you start ArgoUML, the Tools menu should now contain an ArgoPrint menu item.

Using ArgoPrint

In order to use ArgoPrint you must first open an ArgoUML project.

Generating Documentation

To generate documentation from your ArgoUML model:
  1. Select the templates that you want to use.
  2. Enter the output directory.
  3. Click the Generate button.

Cloning Templates

Cloning a template allows you to customize it to meet your own needs. To clone a template into your local template repository.

  1. Select the templates that you want to use.
  2. Click the Clone button.

The cloned templates will now appear in your local template repository. This is located in your ~/.argouml/templates on Linux & Mac OS X, and in /Users/<username> in Windows 7.

Editing Template Metadata

You may edit the information about any of the non-default templates. Simply click on any of the fields in the row, and edit the information.

Deleting Templates

To delete a template and its associated template metadata file from your local template repository:

  1. Click on the Tools/ArgoPrint menu item. The ArgoPrint dialog will then appear listing all of the currently registered templates
  2. Select the templates that you want to delete
  3. Click the Delete button. The selected templates will then be deleted.

Note that you cannot delete the default templates. You may only delete the templates found in your local template repository. This repository is located in your <User Home>/.argouml/templates directory. Where User Home is:

Operating System Location
Linux /home/myUserName
Mac OS X /Users/myUserName
Windows 7 /Users/myUserName

Creating Templates

The default templating engine for ArgoPrint is Apache's Velocity. In the examples which follow, you'll see how to create your own templates.

By default, Velocity's context contains the an ArgoUML project object, and a DiagramUtil object. With these two objects you can easily extract information from your ArgoUML project file.

Let's say that we want to iterate through each of the use case diagrams, and extract each of the use cases. We want to print the name and description of each use case.

#foreach( $diagram in $DiagramUtil.getUseCaseDiagrams($project)) $diagram.getName() $DiagramUtil.getDiagramAsSVG($diagram) #foreach ($usecase in $DiagramUtil.getUseCases($diagram)) $usecase.getName() $DiagramUtil.getMemberDescription($usecase) #end #end

In the first line, we extract each of the use case diagrams from the project using the DiagramUtil.getUseCaseDiagrams method, and iterate over them using the foreach construct from the Velocity templating language. The getUseCaseDiagrams method returns a list of ArgoDiagram objects.

In the third line, we convert the use case diagram to SVG. ArgoPrint currently supports two types of diagrams (SVG, and embedded base64 images). To embed an image in base64, simply use embed an img tag as shown below:

<img src="data:image/jpeg;base64,$DiagramUtil.getDiagramAsJPEG($diagram)"/> You'll find complete documentation for the DiagramUtil class here.