Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: for the plan.

Jump to: navigation, search

Graphical Modeling Framework/FAQ

Dev Builds
Update Site releases milestones
Mailing ListNewsgroupIRC
Help Wanted
Bug Day
GMF Notation: View CVS repo

GMF Runtime: View CVS repo
GMF Tooling: View Git Repo, GitHub


About GMF

What can I do with GMF?

Using GMF, you can produce graphical editors for Eclipse. For example, a UML modeling tool, workflow editor, etc. Basically, a graphical editing surface for any domain model in EMF you'd like. For some example eyecandy, visit the gallery.

How can I get started using GMF?

For the tooling side, the tutorial is a good place to start. For the runtime, which can be used without the tooling, an article posted here is a good place to get an overview. For more information, take a look at the documentation available on the documentation site.

What are the advantages of using GMF over just EMF and GEF?

This depends on what you are trying to accomplish. For full-featured graphical editors that require the rich capabilities of GEF working with an EMF domain model, GMF is a good option. But then, you may be interested in a lightweight implementation, read-only visualizations, etc. In fact, you may not even need GEF, as is the case with TPTP's visualization of profiling data. For an overview of the features and functionality you can achieve using GMF, look here. To get a sense of how the generative framework can get you going quicker, look here.

What are the prerequisites for using GMF?

If you look at the download page for a particular build, you will see a list of prerequisites with links to their download pages. The update site contains stable (milestone) builds and will require their corresponding milestone releases from the main GMF dependencies (EMF and GEF).

What is the relationship between semantic, domain, notation, and graphical definition models?

In general, the terms semantic and domain model are synonymous and refer to the information being visualized and edited. The information used to represent and persist the visual elements in the GMF runtime is referred to as the notation model. When defining the diagram nodes and figures for use in generating the graphical editor, the toolsmith works with a graphical definition model. This is similar to the notation model, but they are distinct. The graphical definition model is linked to the domain and tooling definition models using a mapping model, which is used to produce a generation model that is used to drive the code generation. Clear as mud? ;) A picture of the models and their workflow is found at the beginning of the tutorial.

How can I contribute to GMF?

The best place to start is by looking in Bugzilla. Either find a bug to work on, coordinating with a developer, or submit a patch for an enhancement. Participation in the newsgroup and mailing list is also encouraged, as is trying out builds and reporting bugs, feature requests, documentation, etc. All ther entry point are described in the Get Involved section.

What is the release plan for GMF?

You can find our project plan posted here.


What does 'canonical' mean in the context of GMF?

As stated in the tutorial "Supporting Canonical Containers": Canonical is the terminology we use to describe a container that keeps its view of the semantic data synchronized with the semantic children. This means there is a complete view of all the semantic data which typically means a 1-1 relationship between the views and the underlying semantic objects. This behavior is necessary because in GMF there are two model layers, one for describing the notation elements on the diagram and another for the semantic model that the notation elements will reference. Please see the Programmers guide for more detailed information regarding GMF runtime architecture. Due to this two tiered model architecture there is need for management between the two layers if the user wants to see a full view of the semantic containment without having to manually create notation views for underlying semantic elements.

Can I use the runtime portion of GMF without the generation portion?

Yes. In fact, it was designed to be extended manually, or targed by a generation facility. Take a look at the provided documentation for examples, tutorial, API docs, etc. to get started.

Why can't I see elements on my diagram, although I can select them?

You are likely using Linux without the Cairo graphics library installed, or Windows 2000 without the GDI+ library installed.

A known workaround to this problem is to disable the anti-aliasing.

You can disable anti aliasing in your GMF editor by updating the XXXPreferenceInitializer class and overriding the initializeDefaultPreferences method.

   public void initializeDefaultPreferences() {
       getPreferenceStore().setValue(IPreferenceConstants.PREF_ENABLE_ANTIALIAS, false);

See this bug for more information.

Your Graphical Editor

How can I customize the properties view?

The default properties view is a tabbed proprties view which is made of the default property view generated by your EMF model.edit, plus a GMF-specific tab that allows you to deal with "graphical" stuff of your item.

Removing a generated tab from the property view

If you don't want to generate the tab, then in you .gmfgen, remove the entry that matches your tab in the GenProperty element.

If you want to remove the tab in already generated code, then simply remove the entry from the generated plugin.xml of your diagram plugin. All you need to know to deal with it can be found in the [Eclipse property sheets documentation.

Changing order of elements or kind of widgets in the property view

The view relies on EMF, then if you want to customize this default sheet, you'll have to customize it with classical EMF manner.

Adding my own property tab

You'll first need to understand how property sheets work. Then GMF generates for you a propertyContributor which has for contributorId the ID of your bundle. With this ID, you can very simply add to your editor properties tabs and sections using classical Eclipse tabbed properties framework.

Using EEF

EEF is an Eclipse project dedicated to customization of property sheets for EMF models. If you use it, it will be enabled in your GMF editor. For step-by-step instructions refer to this forum post and this wikipage.


Can the generation portion of GMF be customized? If so, to what extent?

The tooling side of GMF utilizes Xpand for code generation and can be customized accordingly. You can override these templates for your specific editor as explained in the tutorial. The plan is to allow for extension and customization through contribution plugins too, independently of a specific editor, although at this stage of the project the focus is on providing generation to the provided runtime component.

Other Documentation

Back to the top