vendredi 16 décembre 2011

Do you want to discard this editor's changes ?

If you've used EMF editors you probably already have seen this kind of dialog :

This happens when you did change your model and some external changes (aka somebody else changed your file) happened before you pressed "save".  This is not only an EMF problem, any editor has kind of problematic. Either way the end user have a very hard time undestanding why he has to pick one or the other version as most of the time these changes are not conflicting !

Is that the best we can do ?  Another option is to compare both versions, detect conflicts, and if there is no conflicts, just merge the changes.

Here I changed the number of pages in the EMF Book from the model, and changed the title through the textual editor. When going back on my editor, the comparison, conflict detection and then merge process happens and I get this :

And when I have conflicts?  Then the editor can't do much, right, at least it can helps you and show you the conflict :

How is it implemented ? That's fairly easy using emf and it's diff/merge support :

The general process is : the editor tells the WorkspaceSync class when it got saved (or freshly loaded) . This WorkspaceSync keep a copy of the state of the editor as "ancestor". When an event comes from the workspace, the editor version and the workspace versions are compared using the original copy as a common ancestor to detect conflicts. If there is no conflict, it merges, if there is at least one conflict it asks user.

  The drawback is clear with this implementation : you're keeping around - in memory - a copy of your model to be able to detect conflicts later on.  As such that solution is not for every case.

Other options are possible and might be great ways to exercise your EMF skills, if you try something, tell me !

mardi 6 décembre 2011

Eclipse Day Paris 2011

Eclipse Day Paris took place a few weeks ago, every year it is scheduled the week after Eclipse Con Europe. I had the chance to attend the 2011 edition and it was a real pleasure for several reasons.

1 - Organization rocked

The event was perfectly organized. Proxiad and Zenika did a great job, timing was perfect for the presentations, the content was interesting and the french touch for food and wine have been highly appreciated !

Proxiad and Zenika are fairly original service providers : highly technical and active in open source communities, it's always a pleasure to collaborate with them. Congrats to the organizers !

2 - Diverse content

The talks were very diverse, from Ralph and the Eclipse Foundation to UI testing going through modeling, OSGi, Scout, BI and industrial feedback. A nice combination.

3 - Wide and Diverse audience

The event was free and attracted a wide and diverse audience. That was perfect for me as I was there as "Eclipse Modeling Evangelist", helping people understand what kind of technologies we are building in this project and how they could benefit from it with a very low cost or risk.

Slides (in english) are available here.

The room was crowded and actively listening. I had many interactions after the talk. The Eclipse Modeling project is very hard to understand from the outside, it is highly fragmented and poorly publicized. I'll try to give more talks of this kind in the future.

4 - Hands on

Afternoon we had an "hands on" session with Obeo Designer, timing was short but all the attendees managed to build a DSL and a graphical modeler during the session.

It's always enlightening for us to interact directly with users trying the technology. It helps us identify very small things which are making a huge difference at the end. Obeo Designer 6.0 will bring a lot of good stuff in this regard, stay tuned !

In a nutshell I really liked this event which is a good complement to other Eclipse events like democamps or eclipse conferences. I'm looking forward to it for next year and can only advice you to book the dates !

jeudi 1 décembre 2011

SysML Comparison and Contributions

Community and Ecosystem

The Juno release cycle has been very interesting for EMF Compare - as a project.

Discussions started through the  Modeling Platform working group lead to the sponsorship of a bunch of new features (we covered those before but in a nutshell :  UML dedicated support, UI enhancements, Graphical comparison support and Logical Model for EGit). 

Meanwhile we took a number of actions to make this project a more welcoming area for contributions and to ease adoption, some of these actions are technical (documentation, build, tests and continuous integration) and others are focused on community grow (transparency, communication, discussions with academic researchers).

We are not done yet and have several remaining actions but we can already see some results :

- new adopters appeared and contacted us through the bugzilla with use cases we had not envisionned, trying to keep the answering delay reasonable helped a lot in converging to a patch. Within Eclipse itself we've seen several new projects adopting the technology.
- new features contribution :  thanks to Arthur from Atos a dedicated support for SysML model just got integrated and is now built. In those cases where timeframe is obviously bigger than a simple patch, git helps a lot.
- discussions with academics helped us drafting powerful new features for 2.0 like fingerprints based matching (a complete blog post about this will come soon)

EclipseCon US will be a great place to share our experience, I if you're interested or would like to see a specific topic within this scope, feel free to add a comment.

More about SysML ...

The SysML contribution is built on top of the UML dedicated support, it just got integrated and built.
It never got released so it might be a bit rough, and we still have some issues we want to fix for 1.3 but if you feel adventurous, go get the bits here !(update site)