Version 6.4
Copyright © 2009 , 2010, 2011 , 2012 Lars Vogel
21.10.2012
| Revision History | |||
|---|---|---|---|
| Revision 0.1 | 14.02.2009 | Lars Vogel |
created |
| Revision 0.2 - 6.4 | 16.02.2009 - 21.10.2012 | Lars Vogel |
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
org.eclipse.e4.ui.model.workbench,
org.eclipse.e4.core.contexts.
Create a folder called
model
and create a new EMF model called
UiExtensions.ecore
via
→ → → → .

Right-click on the model and select Load Resource....

Click on the
and select the model
from
org.eclipse.e4.ui.model.workbench.


Create a new EClass model element called
MyOwnPart
and add the following
Part
ESuper
Types
to it.

Create another model element called
MyOwnPartStack
with the
supertype
PartStack
The finished model
should look like the
following.

Generate a EMF genmodel from this ecore model and create the Java code.

Export all package via
the Runtime tab on the
plugin.xml.
plugin.xml
file will be created and the
org.eclipse.emf.ecore.generated_package
extension 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.
Before posting questions, please see the vogella FAQ. If you have questions or find an error in this article please use the www.vogella.com Google Group. I have created a short list how to create good questions which might also help you.
http://wiki.eclipse.org/E4 Eclipse E4 - Wiki