Table of Contents
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.
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.
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.
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.
The button will be enabled, if all settings are made and a model is loaded. You can load the model by selecting 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:
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).
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.
The following tables provide a reference for GUI menu options.
Table 4.1. menu
| Item | Shortcut | Comment |
|---|---|---|
| Ctrl-N | Creates a new transformation definition file (*.iqp) | |
| Ctrl-O | Opens a transformation | |
| Ctrl-S | Saves the current transformation, if modified | |
| Enables you to save the current transformation with another name | ||
| Ctrl-Q | Saves the properties and quits the program |
Table 4.2. menu
| Item | Shortcut | Comment |
|---|---|---|
| F7 | Expands or collapses the view with detail information about the current selected model element | |
| F8 | Expands or collapses the view with the selected elements for generation |
Table 4.3. menu
| Item | Shortcut | Comment |
|---|---|---|
| Ctrl-G | Starts generation | |
| F5 | Loads the model which is set as source model file | |
| Ctrl-W | Opens the work directory in the filemanager view. The work directory is the place where iQgen saves the compiled JSP templates | |
| Removes all files from work directory. This causes iQgen to create and compile all JSP templates when generating |
To set iQgen properties, open the properties dialog with the menu item or simply with the accelerator Ctrl-P. There are various kinds of settings. Most settings are self-explanatory.

| Item | Comment |
|---|---|
| Show attributes | Show attributes as elements in modeltree |
| Show operations | Show operations as elements in modeltree |
| Show stereotypes | Show stereotypes as informational text in modeltree |

| Item | Comment |
|---|---|
| Use model validation | It 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 selected | Suppress the confirmation dialog |
| Reload always newer model file before generating | If your model has changed it will be reloaded from disk |
| Create backups for generated files | Every generated file is copied to a file with .old-extension before overwriting |
| Force regeneration of all files | All files will be generated although the template and the model have been unchanged |
| Load model on program start |

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)