Multi-Viewpoints on EclipseCon Program

Posté le dans Blog
To demonstrate Sirius on short talks, I'm used to create a modeler from scratch, in ten minutes, on a topic that everybody in the audience knows: the conference they are attending.

For Eclipse Con Europe, I decided to extend this demo in order to illustrate one of Sirius' main feature : the possibility to present the same model according to different concerns.

Using Ecore Tools (based on Sirius), I created a small modeling workbench based on this DSL.



Based on this DSL, my new Conference modeling workbench provides four different representations : 3 diagrams and a cross-table.

Track Diagram

This diagram allows me to create tracks and talks, thank to the tools in the palette. For each track, I can define its speakers, the day of the talk, its location and at what hour it will be given.

Here I have created the talks by Obeo and Thales.


The container presenting each talk has a conditional style : its color depends on its duration (green if the duration exceeds 35 mn).

When populating this diagram, Sirius creates EMF objects based on the conference DSL. They can also be seen in the Model Explorer.



I have also defined two optional layers on this diagram: "Sirius" and "Speakers". Each layer allows me to dynamically change the appearance of displayed objects.



When activated, the "Sirius" layer highlights the talks containing Sirius in their title: the Sirius icon is displayed as a to-right decorator on the concerned talks, and the other talks are colored in gray.



When de-activated, the "Speaker" layer hides the speakers.


Location Diagram

This other diagram automatically presents the same talks grouped according to their location.


Days Diagram

This last diagram presents the talks grouped according to the days.


Program Table

Finally, I have also defined this table which shows the program in a classical tabular way:


Behind the scenes

These representations are simply defined without any line of code, thanks to Sirius declarative mode.


The elements of this tree define which instances of the DSL are displayed in each representation and with which graphical style.

For example, the element TalkContainer allows to display all the instances of Talk which can be retrieve through the talks reference of the current track.




Its style is defined by the Gradient white to light green element which sets the shape, the color and the label of the talk.



Auteur d'origine: Fred