Eclipse Graphical Editing Framework (GEF)
This repository contains the code base of the Eclipse Graphical Editing Framework (GEF) project's legacy components Draw2d 3.x, GEF (MVC) 3.x, and Zest 1.x, which are still maintained but will not be developed further. The code base of the current GEF production components is located in the eclipse/gef repository instead.
In order to develop graphical applications with GEF-Legacy, you should first set up a proper development environment. The following sections shortly lay out how to set up an Eclipse IDE for this purpose. They conclude with running our deployed and undeployed examples to confirm everything is set up properly.
Set up an Eclipse IDE
Install a recent Java SE Development Kit 8 as a prerequisite.
Download an 'Eclipse IDE for Eclipse Committers (Neon)' package and start it, pointing to an empty workspace folder.
Set up a Target Definition containing GEF-Legacy (development snapshot)
- Go to File -> New -> Project... and select to create a General/Project. Name it
gef-legacy-integration.targetor as you like, the project is to contain only a target definition.
- Go to File -> New -> Other... then choose Plug-in Development/Target Definition and create a new empty (Nothing: Start with an empty target definition) target definition file named
gef-legacy-integration.targetwithin the newly created project.
Close the Target Editor that has automatically opened, open the target file with the Text Editor using the Open With context menu, then paste the following contents:
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde version="3.8"?><target name="gef-integration" sequenceNumber="1"> <locations> <location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit"> <unit id="org.eclipse.sdk.ide" version="4.6.0.I20160606-1100"/> <repository location="http://download.eclipse.org/releases/neon"/> </location> <location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit"> <unit id="org.eclipse.zest.sdk.feature.group" version="0.0.0"/> <unit id="org.eclipse.draw2d.sdk.feature.group" version="0.0.0"/> <unit id="org.eclipse.gef.sdk.feature.group" version="0.0.0"/> <unit id="org.eclipse.gef.examples.feature.group" version="0.0.0"/> <repository location="http://download.eclipse.org/tools/gef/updates/legacy/integration/"/> </location> </locations> </target>
- Now open the
gef-legacy-integration.targetfile with the Target Editor again, using the Open With context menu, let if fully resolve, then click Set as Target Platform (link in the upper right corner of the editor).
Run the examples
As the deployed 'Flow', 'Logic', 'Shapes', and 'WYSIWYG Document' GEF (MVC) examples are contained in the target definition, we only need to start a new Eclipse Runtime to run them:
- Go to Run -> Run Configurations... then create a new Eclipse Application launch configuration and Run it.
- Go to File -> New -> Project... and select to create a new General/Project. Name it
gef-logic-exampleor as you like.
- Go to File -> New -> Example... and select to create a new GEF (Graphical Editing Framework)/Logic Diagram, choosing the Four-bit Adder Model from the Logic Model Samples section.
The undeployed Draw2d and Zest examples have to be checked out in source before. Using EGit this can easily be achieved as follows:
- Go to File -> Import..., then select Git/Projects from Git, press Next >.
- Select Clone URI, press Next >.
https://github.com/eclipse/gef-legacy.gitto the URI field , press Next >.
- Select master branch, press Next >.
- Confirm the local directory or change it as needed, press Next >.
- Ensure Import existing Eclipse projects is checked, then select Working Tree and press Next >.
org.eclipse.zest.examples, press Finish.
- Select an arbitrary example class, e.g.
org.eclipse.zest.examples.jface.GraphJFaceSnippet1, in the Package Explorer view and select Run As -> Java Application from the context menu.
How to proceed from here?
The first thing you will probably want to consult is the developer documentation, which explains the different framework components in detail. It is bundled by the individual SDK features that are available for the framework components and can be accessed via Help -> Help Contents if these features are installed into the Eclipse IDE (its not sufficient to include them in a target definition for this purpose). It is further contributed to help.eclipse.org for each release, where it can be accessed online.6)
All further project information (forum, mailing list, issue tracker, update-site locations, release plans) can be retrieved from the project meta-data at projects.eclipse.org.
If you want to contribute, please consult the contributor guide.