Chapter 3. Customizing and Adjustments

Table of Contents

3.1. Source Code Repository Layout
3.2. List of GeneSEZ Plug-In Projects

The behaviour of GeneSEZ can be customized in various way and some customizations need a special setup.

Project specific

Use an eclipse class folder (i.e. the folders content is accessible by java class path lookup) in your generator project, name it something like customization and place all your advice scripts and templates (Xtend and Xpand AOP) there. For java based adjustments use an additional source folder. Ensure the correct file encoding!

You can even put scripts and templates provided by GeneSEZ there and adjust it to your needs in case you don't like AOP or AOP is not sufficient. Doing so ensure your class folder (and maybe source folder) appears before the Plug-In dependencies in the class path order (right click on your project, select Build Path » Configure Build Path..., go to the tab Order and Export).

You can place the GeneSEZ plug-ins containing the behaviour you want to adjust into your workspace even if you have installed GeneSEZ. The plug-ins in your workspace are then used instead of the installed ones. Note that you do not have to put all plug-in projects in your workspace.

Plug-In projects

You place the GeneSEZ plug-ins into your workspace and adjust them as you need. Note to keep track of your changes to avoid a merge nightmare when you update the GeneSEZ plug-ins of a future version.

Consider the plug-ins to be placed in the workspace carefully. Platform and adapter projects can be usually simply placed there without any further doing. In case of meta model projects you clearly have to build the meta model by yourself. For eclipse integration projects you need to start a runtime eclipse to reflect the changes.

Note

We recommend to start a runtime eclipse for changes to take effect on meta model plug-ins or the eclipse integration plug-in. You can start a runtime eclipse by right click on your project, select Run As » Eclipse Application. For futher information on Eclipse Plug-In development refer to the Eclipse Application Launcher Documentation, the Eclipse Plug-in Development FAQ, or any tutorial on the web, e.g. the Plug-in Development Tutorial.

Placing some Plug-In Projects into the Workspace

You need to have GeneSEZ installed. Use our repository to checkout the projects you need ( Section 3.1, “Source Code Repository Layout” and Section 3.2, “List of GeneSEZ Plug-In Projects” may help identifying it). Ensure to choose versions compatible to your installed GeneSEZ version!

Build GeneSEZ (Meta Model) Projects

You need to build the meta model projects if you place them in the workspace. To build them you need the org.genesez.build project within your workspace.

  1. Configure the build project by creating the file build/environment.properties. You can use build/environment.properties.template as basis. You need to care about the following properties:

    ECLIPSE_HOME

    Specifies the eclipse home directory, i.e. the directory where eclipse.exe or eclipse is located.

    MAGICDRAW_DIR

    Specifies the home directory of magic draw, i.e. the directory where magic draw is installed or unpacked to.

    All other properties you can leave at their default value.

  2. After configuration you can build any (meta model) project in your workspace. Go to the build directory of your project, right click on the file build.xml and select Run As » Ant Build.... Go to the JRE tab and choose the entry Run in same JRE as the workspace and click Run to start execution.

    Note the build script calls the java compiler to compile source files. If your JAVA_HOME is pointing to an JRE you will get an error result. In this case make sure eclipse compiles the newly source files before you proceed.