As we get closer to the ship date of Eclipse Luna, I’m counting down the 10 features of Eclipse 2014 that I’m most excited about. Number 9 on my list is a feature that’s close to my heart, graphical modelling. The Sirius project combines modelling and graphical editors – an area that I spent several years of my life studying. Using Sirius, you can create graphical editors and a modelling workbench for your domain specific language. Instead of explaining this with acronyms and several levels of indirection, let’s go straight to an example.
Let’s start with a simple model for the FIFA WorldCup of Soccer. This model contains nations, groups and players, although you could add more elements if you wish.
From this model, EMF can be used to generate the scaffolding and even a simple editor. But what if a graphical editor works better for your domain? With Sirius you can map model elements to graphical elements, build custom palettes, and even integrate direct editing capabilities. In this example, we could map Groups and Nations to nodes in a graph.
Adding a palette to directly manipulate the data is trivial. You simply add the type of tool you want (node creation or edge creation tool, for example) and map it to an element. We could fill out the rest of the tournament by adding a node for each nation and connecting them to their respective groups.
Sirius also supports in-place editing, which means you can directly edit the labels instead of digging through property pages.
In addition to graph based editors, Sirius can also produce interactive tables and trees that represent your data. Map your model elements to rows and columns and let Sirius take care of the rest.
The real power of these views comes from the synchronization. As you manipulate the data in one view, all the other views are updated simultaneously, allowing your users to use the best tool for the job.
Finally, the EMF Model Editors (Ecore Tools) has been re-implemented using Sirius. This brings top-notch, graphical model editors to EMF and the Eclipse Modelling Package.
For more Eclipse Tips & Tricks and my annual Eclipse Top 10, follow me on Twitter.