Copyright © 2009 , 2010, 2011 , 2012 Lars Vogel
|Revision 0.2 - 6.4||16.02.2009 - 21.10.2012||Lars
|bug fixes and enhancements|
Table of Contents
Define a plug-in called com.example.e4.model.extensions based on OSGi without an activator.
Add a dependency to the
Create a folder called
and create a new EMF model called
→ → → → .
Right-click on the model and select Load Resource....
Click on the
Create a new EClass model element called
and add the following
Create another model element called
The finished model
should look like the
Generate a EMF genmodel from this ecore model and create the Java code.
Export all package via
the Runtime tab on the
plugin.xmlfile will be created and the
org.eclipse.emf.ecore.generated_packageextension point will be added to the file. This extension point describes your model. It will only be added if no plugin.xml file does exists until this point in time. If you later adjust for example your packages, etc you have to adjust the extension point manually.
<?xml version="1.0" encoding="UTF-8"?> <?eclipse version="3.0"?> <!-- --> <plugin> <extension point="org.eclipse.emf.ecore.generated_package"> <package uri="http://www.vogella.com/uiextensions" class="extension.ExtensionPackage" genModel="model/UiExtensions.genmodel"/> </extension> </plugin>
Note down the uri from the extension point. You need later to define this in your Application.e4xmi.
Maintaining high quality free online tutorials is a lot of work. Please support free tutorials by donating or by reporting typos and factual errors.
If you find errors in this tutorial, please notify me (see the top of the page). Please note that due to the high volume of feedback I receive, I cannot answer questions to your implementation. Ensure you have read the vogella FAQ as I don't respond to questions already answered there.