GMF Samples And Tutorials
http://gmfsamples.tuxfamily.org/wiki/
2024-03-29T12:28:02+00:00GMF Samples And Tutorials
http://gmfsamples.tuxfamily.org/wiki/
http://gmfsamples.tuxfamily.org/wiki/lib/images/favicon.icotext/html2012-07-06T20:13:15+00:00Jean-François Brazeaugmf_tutorial5
http://gmfsamples.tuxfamily.org/wiki/doku.php?id=gmf_tutorial5&rev=1341605595&do=diff
In this topic we will see a method to build a cutsom figure with specific edge anchor zones.
We will build a diagram editor allowing to draw operators such as plus and minus. We'll connect them to input entries and output results.
An operator has two inputs and one output. The input may be connected to an entry (that the user may modify), or a result (which is read only). The output can only be connected to a result.text/html2012-06-15T20:56:09+00:00Jean-François Brazeaugmf_tutorial1
http://gmfsamples.tuxfamily.org/wiki/doku.php?id=gmf_tutorial1&rev=1339793769&do=diff
In this tutorial we will build a simple editor allowing to create folders and files.
Full code is availabale through :
* SVN : <https://gmfsamples.svn.sourceforge.net/svnroot/gmfsamples/Filesystem/tags/tuto1-final-diagram/>
* direct download : <https://sourceforge.net/projects/gmfsamples/files/20091121/tuto1-final-diagram.zip/download>text/html2011-12-07T21:05:32+00:00Jean-François Brazeaustart
http://gmfsamples.tuxfamily.org/wiki/doku.php?id=start&rev=1323291932&do=diff
Eclipse GMF is very exciting technolgy. Unfotunately, it is not very easy to understand. The tutorials that can be found about GMF on the Internet are not always detailed enough.
This project aims to give a few samples to help people interested in GMF to get into that technology with step by step examples.text/html2011-08-08T20:08:43+00:00Jean-François Brazeaucompartment_nodes_persistence_fix
http://gmfsamples.tuxfamily.org/wiki/doku.php?id=compartment_nodes_persistence_fix&rev=1312834123&do=diff
When one build a diagram editor that automatically creates nodes into compartments, these nodes are not persisted until at least one node is connected to another node.
For example, on the diagram editor built in the 5th tutorial, if we create a new diagram, add a Plus operator into it, save it and close eclipse : when eclipe is re-opened, the Plus operator has lost its operator inputs and output :text/html2011-08-08T20:08:14+00:00Jean-François Brazeaucompartment_deletion_fix
http://gmfsamples.tuxfamily.org/wiki/doku.php?id=compartment_deletion_fix&rev=1312834094&do=diff
By default, GMF strangely allows compartments to be deleted.
If we take the diagram editor built in the second tutorial, we can see that it is possible to delete a compartment by (as shown below) :
* selecting the compartment
* right clicking on it
* choosing Delete form model in the popup menutext/html2011-08-08T20:07:54+00:00Jean-François Brazeaugmf_tutorial9
http://gmfsamples.tuxfamily.org/wiki/doku.php?id=gmf_tutorial9&rev=1312834074&do=diff
This tutorial shows how to fill a fiagram node with a gradient color.
It is based on the model built in the first GMF tutorial wich is availabale through :
* SVN : <https://gmfsamples.svn.sourceforge.net/svnroot/gmfsamples/Filesystem/tags/tuto1-final-diagram/>
* direct download : <https://sourceforge.net/projects/gmfsamples/files/20091121/tuto1-final-diagram.zip/download>text/html2011-08-08T20:07:44+00:00Jean-François Brazeaugmf_tutorial8
http://gmfsamples.tuxfamily.org/wiki/doku.php?id=gmf_tutorial8&rev=1312834064&do=diff
In this tutorial we will see how to add a label to a diagram edge.
The diagram editor will allow to add Objects linked to other Objects.
Each link will have an identifier displayed through a dedicated label.
This tutorial has been built with :
* Eclipse 3.5.1
* Graphical Modeling Framework SDK 2.2.1
* Eclipse Modeling Framework 2.5.0text/html2011-08-08T20:07:32+00:00Jean-François Brazeaugmf_tutorial7
http://gmfsamples.tuxfamily.org/wiki/doku.php?id=gmf_tutorial7&rev=1312834052&do=diff
With GMF, node compartments traditionnaly have list layouts or not layout at all.
The second choice is selected when on want to put the diagram nodes freely in the compartment. The first choice allows to get nodes automatically positionned vertically in the parent node. It is then not possible to move or resize these nodes. For example, we may use this feature if we want to built an UML class diagram editor ; in a class node, two compartments should be inserted vertically, the first accepting a…text/html2011-08-08T20:07:14+00:00Jean-François Brazeaugmf_tutorial6
http://gmfsamples.tuxfamily.org/wiki/doku.php?id=gmf_tutorial6&rev=1312834034&do=diff
In this topic we will see how to force diagram edeges to be connected to their nodes through punctual locations.
This can become necesary for example when a figure is not rectangular (ex : a circle). As you can see above, if the edges are randomy positionned :text/html2011-08-08T20:06:44+00:00Jean-François Brazeaugmf_tutorial4
http://gmfsamples.tuxfamily.org/wiki/doku.php?id=gmf_tutorial4&rev=1312834004&do=diff
In this topic we will see how to build a custom node figure.
We will redefine the file node figure of the filesystem tutorial to get something like this :
This tutorial is based on the third tutorial.
The tutorial 3 model files can be downloaded from this [location].text/html2011-08-08T20:06:31+00:00Jean-François Brazeaugmf_tutorial3
http://gmfsamples.tuxfamily.org/wiki/doku.php?id=gmf_tutorial3&rev=1312833991&do=diff
In this topic, we will see how to change the default icons generated by EMF / GMF.
When the EMF editor is generated, severals icons are created in the plugin icons folders.
Changing our diagram default icons is mainly to replace these images.
Full code is availabale through :text/html2011-08-08T20:06:19+00:00Jean-François Brazeaugmf_tutorial2
http://gmfsamples.tuxfamily.org/wiki/doku.php?id=gmf_tutorial2&rev=1312833979&do=diff
In this tutorial we will illustrate the compartment feature of GMF.
This tutorial is based on the model built in the first tutorial.
The model files can be downloaded from this [location].
Full code is availabale through :
* SVN : <https://gmfsamples.svn.sourceforge.net/svnroot/gmfsamples/Filesystem/tags/tuto2-final-diagram/>
* direct download : <https://sourceforge.net/projects/gmfsamples/files/20091121/tuto2-final-diagram.zip/download>text/html2011-08-08T20:05:43+00:00Jean-François Brazeauemf_tutorial6
http://gmfsamples.tuxfamily.org/wiki/doku.php?id=emf_tutorial6&rev=1312833943&do=diff
This tutorial is an EMF that shows a simple way to add Java validation rules to a model using the EMF validation Framework.
To go fast, it takes the output of the GMF tutorial 7 as an input (in order not to have to build a new ecore model).
The EMF Validation Framework is rich and offers different ways to implement validation rules for a model : you can use annotations, OCL language, and so on. If you are a Java developer, Java language is maybe the best way to implement validation rules, and y…text/html2011-08-08T20:05:28+00:00Jean-François Brazeauemf_tutorial5
http://gmfsamples.tuxfamily.org/wiki/doku.php?id=emf_tutorial5&rev=1312833928&do=diff
This tutorial is an EMF & GMF tutorial.
To go fast, it takes the output of the GMF tutorial 7 as an input (in order not to have to build a new ecore model).
It shows how to replace the default EMF editor associated to a property in the properties view by a custom dialog editor.text/html2011-08-08T20:05:15+00:00Jean-François Brazeauemf_tutorial4
http://gmfsamples.tuxfamily.org/wiki/doku.php?id=emf_tutorial4&rev=1312833915&do=diff
This tutorial is an EMF tutorial and is compatible with GMF.
To go fast, it takes the output of the GMF tutorial 7 as an input (in order not to have to build a new ecore model).
It shows how to change the element label in the list dialog opened from the properties view.text/html2011-08-08T20:05:04+00:00Jean-François Brazeauemf_tutorial3
http://gmfsamples.tuxfamily.org/wiki/doku.php?id=emf_tutorial3&rev=1312833904&do=diff
This tutorial is an EMF tutorial and is compatible with GMF.
To go fast, it takes the output of the GMF tutorial 7 as an input (in order not to have to build a new ecore model).
It shows how to restrict the available elements that can be chosen in a list property (by default EMF allows to select any element that matches the selected property type).