jeudi 28 octobre 2010

Sequence Diagrams for your DSL's

We're working a lot on Obeo Designer 5.0 - release planned for Q1 2011 , on the traceability support and the next-gen model to text transformation language.

Concerning the editing and diagraming support changes are more subtles though powerful. Here is a quick glimpse on the latest milestone :

The most visible change is the work on the diagram ergonomy, the user interface has been cleanup, streamlined and features are more accessible. The global toolbar has been replaced with a dedicated toolbar embedded in the diagram editor providing access to the filters and the enablement of layers.
The contextual actions have been re-organized too.

If you're used to nice Eclipse editors you'll be happy to learn that the "Quick Outline" (summoned thanks to CTRL+O) is available in the diagrams now.

Just type in any word here, and the corresponding model element will be revealed in your diagram.

More interesting is the redesigned support for diagrams ! You can, for any kind of model being UML or your own DSL, specify and leverage a diagram editor keeping the model sequence order in sync with the diagram ordering.

you have the same level of customization that for the other kind of diagrams, you can change the shapes, colors and use the sequence diagram constructions like lifelines, messages and executions.

Here we're not using UML but our own "interactions" DSL which refers to another DSL describing domain entities.

As a sidenote, you can now have a color definition which is interpolated on a color palette depending on some model computation. Here we have a nice shade of green depending on the level of execution.

In a nutshell this new release will bring you more control, to the visual aspect and interactions on the tooling, the ability to define sequence diagrams, still keeping the complexity to a minimum : no deployement requirement, one file describes the whole design environment which you can test and try without even starting an Eclipse runtime.

It doesn't mean you can't deploy your environment as a set of plugins with proper dependency checking thanks to P2, it's just that you don't have too.

If you don't know about Obeo Designer and you want to setup a dedicated design + transformation toolchain for your domain, have a look here.

Here is a flash demo being a recap of these features :

mercredi 13 octobre 2010

Model Comparison : Patching with MPatch

The following message is posted on this blog on behalf of Patrick Könemann

Cédric already announced it two weeks ago: MPatch is integrated into EMF Compare!

Did you ever want to transfer changes from one model to another?

Or do you frequently perform the same changes on your models?

MPatch is a technology that stores model changes as self-contained artifacts, just like patches, that are also applicable to other models! Let me show an example of how MPatch works:

This is just a simple model, a base version on the left and a modified version on the right.
Modeled with the IBM Rational Software Architect, but any kind of EMF model is supported.
The changes are highlighted: 3 deleted attributes, 1 updated attribute, 1 new class, 3 new generalizations.

EMF Compare is a nice tool for calculating such changes. The result is shown below.
All changes are nicely highlighted in the treeviews and one can browse through them.
This is where MPatch comes into play: the export menu lists a new option!

An export wizard is started that guides the user through the MPatch creation task.
In the end, the changes are stored in a file, extract_id.mpatch for example.
This file can now be applied to other models, even if their contents differ!

The model below is a different one -- again we want to extract the id attribute into a common superclass.
However, the attributes, the classes, and even the number of attributes and classes differ!

Let's see how MPatch handles the situation.
Selecting Apply MPatch triggers a wizard with the same name.
The crucial part is the so-called resolution of symbolic references -- they are responsible for selecting the proper model elements of your target model.
Let's have a closer look:

  • The first change is not applicable because there is no attribute called Title -- ignore this!
  • The second change is applicable because a similarly named package (data vs. customerdata) is found -- ok.
  • The third change is applicable because I manually selected Contract and Invoice -- ok.
  • The fourth change is applicable because similar named attributes (id vs. inv_id / con_id) are found -- ok.

Following the wizard to its end updates the given model and this is the result:

To wrap up, an Mpatch is not only a self-contained patch for models, it is even able to make the changes applicable to different models!

Installation instructions and a lot more information on the project website:

vendredi 1 octobre 2010

Autumn is a second spring when every leaf is a flower

Maybe twitter gives a false impression that you're keeping the users informed of what is going on. False because 140 chars can't be enough !

Many things are keeping the Obeo guys busy, from the Eclipse and open-source involvement to the incubation of highly innovative products you'll love while still providing the best service to our customers looking for expertise :) .
Oh, and we provided the first Helios service release for Compare, Acceleo, EEF, ATL and much more, go get the modeling package !

Summer is an internship time in France, and for us every internship's ultimate goal is to hire another great person. I can say we did succeed this year ! Expect even more great contributions, user experience polishing and features for Indigo !!

Furthermore the newcomers completely understood the chocolate-commit spirit ...

No doubt you'll hear about those guys at some point, Stéphane already started to blog...

Speaking about Indigo, we wrote down a "long term roadmap" for EMF Compare on the wiki, feel free to have a look ! Coming soon : more information about the MPatch contribution recently integrated in EMF Compare.

Ok, enough teasing, back to code generation. In case you did not noticed Acceleo 3 provides one of the most compelling editing tooling you can get with the Eclipse platform. Using the JDT I often find myself thinking "oh, they did though about this ! great !" : you'll often get the same feeling with Acceleo 3...
Let's try with an example: it's often useful to be able to call Java logic directly from a template. If you want to do so, start by writting down this java logic.

Then call it from your template, obviously it's not going to work as is. Here we're calling the "getJavaCompatibleName" method on an EClass, but this method is not existing on this type. Acceleo provides a mechanism to call Java logic associated with a given meta-class: the first parameter of the method have to be of the type of the extended meta-class and Acceleo will automatically transform a myInstance.myMethod() call to a SomeClass.myMethod(myInstance).

If you want to try that, call the quickfix menu on the compilation error with CTRL+1 :

Choosing the "Create Java Service Wrapper" quick fix will add a new query to your template :

And your done !