metamodeling with eclipse – addendum - tu/esidorova/mi/metamodeling with eclipse -...

1

Click here to load reader

Upload: dothuy

Post on 05-May-2018

214 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Metamodeling with Eclipse – Addendum - TU/esidorova/mi/Metamodeling with Eclipse - Addendum.pdf · Metamodeling with Eclipse – Addendum ... Framework (EMF). For the model transformation

Metamodeling with Eclipse – Addendum

Setup Download the latest version of Eclipse from http://www.eclipse.org/downloads/ and run Eclipse.

In the toolbar select Help -> Install New Software. Select work with “—All Available Sites—” and install

the Graphical Modeling Framework (GMF) Tooling SDK, which includes the Eclipse Modeling

Framework (EMF). For the model transformation assignment, also install the Henshin SDK (Incubation)

from the Henshin repository: http://download.eclipse.org/modeling/emft/henshin/updates/release.

The GMF only works with Java 1.5 compiler settings, so download and install the JDK 1.5.0 from

http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase5-

419410.html

In the toolbar in Eclipse select Window -> Preferences -> Java -> Compiler, and change the compiler

compliance level to 1.5. Then go to Java -> Installed JREs, search for the JDK 1.5.0 in its installation

directory and select it as the default JRE.

Eclipse can now be used to complete the Metamodeling with Eclipse tutorial.

Tutorial Notes There are minor differences between some of the descriptions in the tutorial document and the latest

EMF/GMF versions, e.g. the EMF Model mentioned in the last paragraph of page 6 is now called EMF

Generator Model in the Eclipse wizard. However, the overall steps in the tutorial have not changed.

Once you have made a Mapping Model (.gmfmap file), you will probably want to modify the Graphical

Definition Model (.gmfgraph) at some point while editing. Do not repeat the “Combine” step in the GMF

Dashboard after making your changes, because this will overwrite the changes you made to the

Mapping Model.

Normally Eclipse synchronizes the .gmfmap and .gmfgraph files when any changes to either are saved,

but occasionally the synchronization does not work properly. The .gmfgraph can also be modified from

the .gmfmap file, which often works better. Once you are done editing, re-execute the “Transform” step

in the GMF Dashboard and generate a new diagram editor.

Please be aware that the GMF does not properly clean up generated code when you make changes. If

you modify your metamodel and encounter errors then manually remove the project folders containing

the generated code (<name>.edit, etc.) and re-generate the code from the .genmodel.

Additional Questions Feel free to send an e-mail with any additional questions to: [email protected]