Chapter 4. Reference

Table of Contents

User Interface
Main Screen
Generation
Root Path
Menu Overview
Properties
Logging
Command Line Options
Ant Integration
Eclipse Integration
Using the iQgen Plug-In
iQgen Console
Known Bugs
Planned Features
The MetaModel
iQgen TagLib
IfTag
ForEachTag
ImportTag
PropertyTag
UserCodeTag
JSPFilenameTag
Tool Interoperability
Test Procedure
Static UML
Dynamic UML
Helpful external Resources

This part of the documentation in intended to serve you as reference while you work with iQgen. It is not meant for reading from beginning to end.

User Interface

On Windows systems you can start iQgen by selecting the corresponding entry in the start menu or by double clicking on {install-dir}/iqgen.bat. On Unix you need to run {installdir}/iqgen.sh. If you start one of these programs without passing any arguments, iQgen will start using the GUI mode.

Main Screen

In the figure below you can see the screen of the sample transformation Tutorial_1. A transformation is defined as a set of configuration items as displayed in the initial screen above. The main items of a transformation (the so called configuration set) are:

  • Source model file (any XMI file that has been exported by a CASE tool)

  • Target generation path (the root directory of the generated code)

  • Template directory (the directory that contains all the templates to be used by the generator)

  • Master template (a special template that controls the generation process; the default is main.jsp)

  • Transformation Properties (a property file to customize your generation at runtime)

As soon as the source model is selected, the generator loads the XMI file. The model contents are displayed in the pane Model Elements.

Figure 4.1. Main window with loaded objects

Main window with loaded objects

You do not need to generate the whole model every time. Instead you can select single or multiple model elements which you want to generate.

Generation

The Generate button will be enabled, if all settings are made and a model is loaded. You can load the model by selecting Run Load Model or by clicking the corresponding toolbar button. This button will be enabled, if the source model file is an existing and valid XMI file. The GUI will mark invalid entries with a red border:

Figure 4.2. Invalid entry (directory does not exist)

Invalid entry (directory does not exist)

Figure 4.3. Valid entry (existing directory)

Valid entry (existing directory)

Tip

The text fields have a quick edit mode. By pressing Tab the entry will be expanded to a valid, existing one or if there are more than one possible file a list will be presented for selection (like UNIX shells).

Root Path

The root path helps you to move projects to another location. You can physically save your project under a different directory. When changing the root path, iQgen offers to translate the other transformation settings (e.g. source model file) to this new location.

Menu Overview

The following tables provide a reference for GUI menu options.

Table 4.1. File menu

ItemShortcutComment
New TransformationCtrl-NCreates a new transformation definition file (*.iqp)
Open TransformationCtrl-OOpens a transformation
Save TransformationCtrl-SSaves the current transformation, if modified
Save Transformation as Enables you to save the current transformation with another name
ExitCtrl-QSaves the properties and quits the program

Table 4.2. View menu

ItemShortcutComment
Detail ViewF7Expands or collapses the view with detail information about the current selected model element
Selected ElementsF8Expands or collapses the view with the selected elements for generation

Table 4.3. Run menu

ItemShortcutComment
GenerateCtrl-GStarts generation
Load ModelF5Loads the model which is set as source model file
Jump to work directoryCtrl-WOpens the work directory in the filemanager view. The work directory is the place where iQgen saves the compiled JSP templates
Clear work directory Removes all files from work directory. This causes iQgen to create and compile all JSP templates when generating

Table 4.4. Options menu

ItemShortcutComment
PropertiesCtrl-POpens the property dialog

Table 4.5. Help menu

ItemShortcutComment
DocumentationF1Opens the documentation.
About iQgen Opens the about window.

Properties

To set iQgen properties, open the properties dialog with the menu item Options Properties or simply with the accelerator Ctrl-P. There are various kinds of settings. Most settings are self-explanatory.

Model

ItemComment
Show attributesShow attributes as elements in modeltree
Show operationsShow operations as elements in modeltree
Show stereotypesShow stereotypes as informational text in modeltree

General

ItemComment
Use model validationIt is possible to validate your model. With this setting you can turn validation on or off.
Clear message field before generating 
Clear System.out before generating 
Confirmation if no elements are selectedSuppress the confirmation dialog
Reload always newer model file before generatingIf your model has changed it will be reloaded from disk
Create backups for generated filesEvery generated file is copied to a file with .old-extension before overwriting
Force regeneration of all filesAll files will be generated although the template and the model have been unchanged
Load model on program start 

JSP Engine

If you like to use more than one instance of iQgen at the same time you will have to define different a ports for each instance. You can set the port to a static number (e.g. 16222), a range (e.g. 16222-16333) or a list of free port numbers (e.g. 16222;16333;16444)

Figure 4.4. JSP-Engine properties

JSP-Engine properties

Dirs

Via this setting you are able to use dynamic classloading. Jars and classes in these directories will be reloaded every time you start generation.

External

Here you can set some links to external programs which should be used to view or open files.

ItemComment
ExplorerTool to open directories (e.g. explorer, konqueror ...)
ViewerFile editor (e.g. notepad.exe)
XMI ViewerTool to open and view the XML file

Logging

To set the log level please press . The table below shows which log levels are available.

LevelComment
InfoTo provide a more detailed insight into iQgen's behavior
ImportantMost interesting status messages
WarningSomething abnormal happened
DebugFor our interest and a better support