The Graphical Modeling Framework is a powerful framework for the development of graphical editors for EMF-based models. It's based on EMF and GEF and uses a model-driven approach for designing the editors.
Building graphical editors is a complex task. While GMF tries to facilitate that procedure, its abstractions are sometimes still a little hard to grasp, and the generated results often need manual fine-tunig to meet end-user expectations. I am a user, not a developer of GMF. Mymain concern is getting things done in the projects I am working on. That's why I sometimes bend GMF to do what I want it do, rather than use it the way it is meant to be used. That fact makes it somehow hard to contribute back to the GMF project. Still, me and my colleagues take a lot of benefit from using GMF.
GMFTools
As a long term user of GMF, I started to collect code, tools, samples and several tipps and tricks in the GMFTools project about a year ago. In the meantime, the project has attracted additional committers and it has become quite a useful collection of real-world solutions around GMF.
GMFTools roughly consists of three components
- UI-Extensions making GMF easier to use.
- Runtime extensions that add new functionality by means of additional classes and generator template changes.
- Examples demonstrating the use of the runtime extensions.

Most of the actions are self-explanatory. You may wonder wh

As a consequence gmfgen model becomes a temporary artifact in the whole code generation procedure. To be able to modify the gmfgen model nevertheless, I have introduced a model-to-model transformation that is performed before generating the actual diagram code from the gmfgen model. This transformation is performed using an Xtend file (both oAW and M2T work) which is persisted next to your GMF design models.
The fix of the type registration will be covered in a post on shared editing domains.

By a single click on the GMF button, all enabled actions are executed on the currently / last selected models. In its drop-down menu you can access all your editor model individually. That really speeds up GMF development significantly, as you no longer have to find your way through the popup menus of different files. Nevertheless, individual actions can still be executed from the popup menus of the respective files.
That's all for today. Stay tuned for more.
2 comments:
Nice post, thanks.
I was particularly caught by your idea of storing original gmfgen separately to the custom changes in the ext file.
I was the one who wrote the reconciler for GMFGen back 3 years ago :). At that time there was an idea to modify default EMF tree editor for GMFGen to collect user changes and store them separately in some place, but we were unable to agree about any particular format, so it had been ended with reconciler approach.
The task -- to listen for some changes and transform them into some M2M constructs (ext, QVT , ...) -- seems to be generic enough for code-generative MDA, not that specific to GMFGen.
But I probably will just try it with GMFGen first.
You may want to have a look at Moritz Eysholdts EPatch model format, which is part of EMF Compare. It allows to store differences between Ecore models in a patch like fashion.
Post a Comment