Jump to: navigation, search

Difference between revisions of "MDT-UML2Tools How To Regenerate Diagrams"

(Checkout source code of GMF generation framework by date tag)
 
(2 intermediate revisions by one other user not shown)
Line 23: Line 23:
 
== Installation of development platform ==
 
== Installation of development platform ==
 
=== Download and install latest release of Eclipse platform. ===
 
=== Download and install latest release of Eclipse platform. ===
The build can be found [http://download.eclipse.org/eclipse/downloads/ here].
+
The build can be found [http://download.eclipse.org/eclipse/downloads/ here].<br>
 +
For Galileo M6 build: <br>
 +
Eclipse SDK, EMF Query, EMF transaction, EMF validation, GEF, GMF, UML2 in Galileo M6 version; <br>
 +
OCL and QVT -- Galileo M5 version;
 +
 
 
=== Run development platform ===
 
=== Run development platform ===
 
=== Define plug-in development platform ===
 
=== Define plug-in development platform ===
Line 31: Line 35:
 
You can use [http://wiki.eclipse.org/images/9/9a/UML2Tools_Codegen.psf PSF file] to check out.
 
You can use [http://wiki.eclipse.org/images/9/9a/UML2Tools_Codegen.psf PSF file] to check out.
 
=== Checkout source code of GMF generation framework by date tag ===
 
=== Checkout source code of GMF generation framework by date tag ===
Checkout source code of GMF generation framework by specific data tag: <span style="color:#ff0000">February 11 2009, 4:00 UTC</span> (for Galileo M6).
+
Checkout source code of GMF generation framework by specific data tag: <span style="color:#ff0000">February 11 2009</span> (for Galileo M6).
 
<br>[[Image:UML2Tools_GMF_Generation_Framework_Data_Tag.JPG]]
 
<br>[[Image:UML2Tools_GMF_Generation_Framework_Data_Tag.JPG]]
  

Latest revision as of 09:56, 3 June 2011

Overview

To regenerate the diagrams you should have 2 Eclipse platforms installed. First is so called "development", second one is "target".

Installation of target platform

Target platform is using to modify UML2 Tools models and execute regeneration.

Download and install Eclipse platform described in dependencies of latest UML2 Tools build.

It's Eclipse R-3.4-200806172000 for current (0.8.1) version.

Download and install other dependencies of latest UML2 Tools build.

Following dependencies should be installed for current (0.8.1) version:

  • EMF 2.4.0 R200806091234
  • Query 1.2.0 R200806091744
  • Transaction 1.2.0 R200806091902
  • Validation 1.2.0 R200806091804
  • OCL 1.2.0 R200806091714
  • UML2 2.2.0 R200806091546
  • GEF 3.4.0 R200806091334
  • GMF 2.1.0 R200806121402

See download page for dependencies of another version.

Install latest build of UML 2 Tools if you are going to work with part of code

Latest build you can find on download page

Close target platform

Installation of development platform

Download and install latest release of Eclipse platform.

The build can be found here.
For Galileo M6 build:
Eclipse SDK, EMF Query, EMF transaction, EMF validation, GEF, GMF, UML2 in Galileo M6 version;
OCL and QVT -- Galileo M5 version;

Run development platform

Define plug-in development platform

Open preferences page "Window -> Preferences -> Plug-in Development -> Target Platform" and select the target platform as location.

Checkout codegen plug-ins

Checkout "org.eclipse.uml2.diagram.codegen" and "org.eclipse.uml2.diagram.codegen.edit". You can use PSF file to check out.

Checkout source code of GMF generation framework by date tag

Checkout source code of GMF generation framework by specific data tag: February 11 2009 (for Galileo M6).
UML2Tools GMF Generation Framework Data Tag.JPG

GMF generation framework contains following plug-ins:

  • org.eclipse.gmf.bridge
  • org.eclipse.gmf.bridge.trace
  • org.eclipse.gmf.bridge.ui
  • org.eclipse.gmf.codegen
  • org.eclipse.gmf.codegen.edit
  • org.eclipse.gmf.codegen.lite
  • org.eclipse.gmf.codegen.lite.ui
  • org.eclipse.gmf.codegen.ui
  • org.eclipse.gmf.common
  • org.eclipse.gmf.formtk
  • org.eclipse.gmf.graphdef
  • org.eclipse.gmf.graphdef.codegen
  • org.eclipse.gmf.graphdef.codegen.ui
  • org.eclipse.gmf.graphdef.edit
  • org.eclipse.gmf.graphdef.editor
  • org.eclipse.gmf.map
  • org.eclipse.gmf.map.edit
  • org.eclipse.gmf.map.editor
  • org.eclipse.gmf.tooldef
  • org.eclipse.gmf.tooldef.edit
  • org.eclipse.gmf.tooling
  • org.eclipse.gmf.validate
  • org.eclipse.gmf.xpand
  • org.eclipse.gmf.xpand.editor
  • org.eclipse.gmf.xpand.migration

In other words its are all plugins from org.eclipse.gmf/plugins" folder without "runtime" in path.

Run Eclipse application

Define new Eclipse application in "Run Configureation..." wizard.
UML2Tools Run Eclipse Application.JPG

Don't forget to set corresponding VM arguments.
UML2Tools Run Eclipse Application VM Parameters.JPG

Run the application.

Regeneration of the diagrams

Checkout diagram plug-ins of UML2 Tools

You should checkout at least "org.eclipse.uml2.diagram.def", that contains models to regenerate the diagrams. Use PSF file to checkout all UML2 Tools plug-ins.

Define Java formatter setting

Set of java formatter settings. A set of format settings is maintained here for you to import into your workspace from Window > Preferences > Java > Code Style > Formatter > Import...

Create generator model

  1. Select corresponding mapping model (*.gmfmap) and invoke "Create generator model..." item of context menu.
  2. Ignore validation errors if any.
  3. Define GMFGraph dymanic templates as "file:/C:/Eclipse/runtime-MDT/org.eclipse.uml2.diagram.def/dynamic-templates/gmf-graph" on the last page of the wizard.
    UML2Tools GMFGraph Dynamic Templates.JPG

Run generation

Select created generator model (*.gmfgen) and invoke "Generate UML2 Tools Diagrams" item of context menu.