Difference between revisions of "Graphical Modeling Framework/FAQ"

From Eclipsepedia

Jump to: navigation, search
m (Other Documentation)
(Using EEF)
 
(14 intermediate revisions by 6 users not shown)
Line 1: Line 1:
== General ==
+
{{GMF}}
 +
 
 +
=FAQ=
 +
 
 +
== About GMF ==
  
 
=== What can I do with GMF? ===
 
=== What can I do with GMF? ===
Line 17: Line 21:
  
 
=== How can I contribute to GMF? ===
 
=== 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.  
+
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|Get Involved]] section.
  
 
=== What is the release plan for GMF? ===
 
=== What is the release plan for GMF? ===
You can find our project plan posted [http://www.eclipse.org/gmf/development/plan.php here].
+
You can find our project plan posted [http://www.eclipse.org/projects/project-plan.php?projectid=modeling.gmf here].
  
 
== Runtime ==
 
== Runtime ==
  
 
=== What does 'canonical' mean in the context of GMF? ===
 
=== 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.
+
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   [http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.gmf.doc/prog-guide/runtime/Developer%20Guide%20to%20Diagram%20Runtime.html 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? ===
 
=== Can I use the runtime portion of GMF without the generation portion? ===
Line 44: Line 48:
  
 
See [https://bugs.eclipse.org/bugs/show_bug.cgi?id=164623 this bug] for more information.
 
See [https://bugs.eclipse.org/bugs/show_bug.cgi?id=164623 this bug] for more information.
 +
 +
== Your Graphical Editor ==
 +
 +
=== How can I customize the properties view? ===
 +
 +
The default properties view is a [http://www.eclipse.org/articles/Article-Tabbed-Properties/tabbed_properties_view.html 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 [[http://www.eclipse.org/articles/Article-Tabbed-Properties/tabbed_properties_view.html 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/Recipes#Recipe: Create your own property editor in a generated application| EMF manner]].
 +
 +
==== Adding my own property tab ====
 +
 +
You'll first need to understand [http://www.eclipse.org/articles/Article-Tabbed-Properties/tabbed_properties_view.html 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 ====
 +
 +
[http://www.eclipse.org/modeling/emft/?project=eef#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 [http://www.eclipse.org/forums/index.php/m/1032719/#msg_1032719 this forum post] and this [http://wiki.eclipse.org/Graphical_Modeling_Framework/Tips#Using_EEF_and_GMF wikipage].
  
 
== Generation ==
 
== Generation ==
  
 
=== Can the generation portion of GMF be customized? If so, to what extent? ===
 
=== Can the generation portion of GMF be customized? If so, to what extent? ===
The tooling side of GMF utilizes JET for code generation and can be customized accordingly. The plan is to allow for extension and customization, although at this stage of the project the focus is on providing generation to the provided runtime component.
+
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 [[../Tutorial/Part 3#Customizing_generation_templates | 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==
 
==Other Documentation==
 +
 +
* [[../Documentation | GMF Documentation Entry point]]
  
 
* [[EMF-FAQ | EMF FAQ]]
 
* [[EMF-FAQ | EMF FAQ]]

Latest revision as of 09:05, 3 April 2013



GMF
Website
Download
Dev Builds
Update Site releases milestones
Community
Mailing ListNewsgroupIRC
Bugzilla
Open
Help Wanted
Bug Day
Source
GMF Notation: View CVS repo

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


Contents

[edit] FAQ

[edit] About GMF

[edit] 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.

[edit] 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.

[edit] 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.

[edit] 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).

[edit] 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.

[edit] 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.

[edit] What is the release plan for GMF?

You can find our project plan posted here.

[edit] Runtime

[edit] 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.

[edit] 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.

[edit] 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() {
       super.initializeDefaultPreferences();
       getPreferenceStore().setValue(IPreferenceConstants.PREF_ENABLE_ANTIALIAS, false);
   }

See this bug for more information.

[edit] Your Graphical Editor

[edit] 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.

[edit] 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.

[edit] 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.

[edit] 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.

[edit] 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.

[edit] Generation

[edit] 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.

[edit] Other Documentation