November 6, 2009

GEF support in SWTbot and GMF

Back from ESE where I gave my presentation about GEF support in SWTBot last week, I am happy to announce that GEF feature is available in SWTBot update site. Thanks Ketan for that.

Quite obviously there are several bugs opened and there is room for improvement but current API is not frozen, so it's time to test and ask for enhancements !

On GMF side I updated yesterday its main wiki page to use tabs. There is a lot of valuable information available on the wiki for GMF, but it was scattered. I hope you find the new page clearer and useful.

September 27, 2009

Nathalie effect : goals, tests and patches

In the last post I blogged about La baule beach. This week-end it was the famous triathlon race in the atlantic seacoast city. At Obeo we try to participate each year to the tri relay. Tri relay distance is quite similar to a triathlon Sprint distance, but each sport event (swimming, cycling, and running) is performed by a different person. This year Ed participated with us. He took the opportunity to be in Nantes to went for a fresh swim early in the morning. During the race, Freddy, Goulwen, Laurent, Nathalie, Stéphane and others cheer for us. Despite of these many supporters, I did not beat a time, to be honest I was one of the slower cyclist. However the tri relay was not the significant competition, the football match on the sand after it was the real one ! After one hour and half we grab a victory and Nathalie was the key of our success ! In the evening we were very well received by Cédric, with a giant and delectable barbecue. Friday and today I worked on GEF Support for SWTBot. If you follow bug 269609, you should have seen that Initial code contribution was committed, and that I am currently working on SWTBot build to include the GEF feature. Nathalie tested and provided patches on first versions, so many thanks to her on this side too.

July 28, 2009

Sea, Text and Fun

I spent last week-end in La baule, having fun to swim, play football and read on the beach.

Photo from Burgermac

Speaking about books, I recently finished to read the great book from Robert C. Martin, Clean Code. One really interesting chapter, is about comments and how they could be dangerous.

I will not speak here about javadoc and API documentation, but all other comments which are used to add tasks (TODO, FIXME), explain an hack or anything else.

The main difficulty is to keep them in sync with the code. As they are not linked to the code they refer, they may move with code addition/refactoring or become inaccurate if the implementation change. Another leak from these comments is that it is difficult to retrieve the author, or to start a discussion from one of them.

In fact, as this kind of comments are meta-data, it could be more logical to dissociate them from code, I mean to store them outside of the code.
We do it of issue tracking (and sometime for tasks), but then comes the problem of integration between tools.

In the last version of OpenOffice, notes are displayed in the margin. I find it very usable.

So here is a quick mockup, of what I would like to have for this kind of comments.

July 8, 2009

Eclipse and firefox 3.5 on linux

If you updated to the last version of the cool open-source web browser, mozilla firefox, on your favorite linux distro, you may have noticed some problems. For instance, if you opened the welcome view or the help contents, the following exception has appeared :

org.eclipse.swt.SWTError: XPCOM error -2147467259

This comes from xulrunner 1.9.1 which breaks binary compatibility with previous versions.You need to add to your eclipse.ini file as jvm argument (after "-vmargs") :


Hope this help.

April 27, 2009

Using 3.3 API for popup menu

I am not sure new qualifier still apply for an API available since Eclipse 3.3, but here are some questions I have asked myself and for which I would like to share some answers.

  • Where can I find a good introduction to the new API ?

There is a great IBM article ideal to discover the API.

  • Where can I find id for group ?

Have a look at the following interfaces :



  • Where can I find available variables ?

On the Eclipse wiki.

  • Where can I find an eclipse plug-in example ?

In one ATL plug-in for instance. Here is an example where the popup menu item is displayed only when the active perspective is the right one, and the selected files extension is ecore.

  • How can I get the selection for popup menu ?

Be careful the selection variable is not the same for classic menu and popup menu.
You have to use activeSelectionMenu.

  • How can I do to not display the menu if the selection is empty ?

You have to use count element.

<visiblewhen checkenabled="false">
<with variable="activeMenuSelection">
<iterate operator="and">
<count value="+">


  • How could I call a test in Java ?

First you have to create a property tester :

<extension point="org.eclipse.core.expressions.propertyTesters">
<propertytester id="com.mycompany.project.tester.MyTester"
namespace="com.mycompany.project.namespace" properties="isLikeIWant"

Then you can use it with test element :

<visiblewhen checkenabled="false">
<with variable="activeMenuSelection">
<iterate operator="and">
<instanceof value="org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart"></instanceof>
<test property="com.mycompany.project.namespace.isLikeIWant"></test>

March 24, 2009

EclipseCon 09 - Week-end before and first day

We arrived with Cedric Friday night in Silicon Valley. Flight trip was an opportunity to try SWTBot and look at current GEF Support.

Saturday morning we decided to see the Googleplex. It was not as easy to find as we originally thought, I mean without looking on google maps or taking the address before :P

At least we found one of their office

as well as their own street

and their famous google cars

On the afternoon we went to San Francisco downtown to enjoy the city and do some shopping. Apple store was an occasion to admire their laptops and ask a seller some facts to convince our Boss that our productivity will increase with them :)

On Sunday we went to Berkeley university, where we met sociable squirrels !

First day of EclipseCon was a lot of fun. There seems to be less people than last year but people are still friendly and enthusiasts.

At morning I attended Ketan great SWTBot tutorial, which was successful as room was filled to the brim.

At the end of afternoon Acceleo "Best Open Source Eclipse-Based Developer Tool" award was the pleasantly surprise. Thanks for the community for this great recognition of our work at Obeo !

March 16, 2009

Eclipse Foundation accepted for GSoC 2009

Despite economic crisis, Google renews its awesome summer of code program in 2009.

Cédric and Ian already blogged about it, but it is now official for Eclipse , we have been accepted as mentoring organization.

Students, Eclipse is a great open-source organization with various projects, have a look at the current ideas page !

I will present more in detail "Acceleo and ATL combine" proposal.

Eclipse Acceleo (previously named MTL) project provides an implementation and a development toolkit for the OMG MOF Model to Text Language.

Eclipse ATL project provides an implementation and a development toolkit for the ATLAS Transformation language.

Project idea is to work on combination of this 2 powerful technologies. On Acceleo side, it means being able in a template to call a model-to-model (m2m) transformation, for instance to improve readeability of a template. On ATL side, it means being able in a transformation to "serialize" model information, for instance to do some reporting.

Implementation should be made without high coupling between ATL and Acceleo as far as possible, in order to support in future other m2m languages, such as OMG QVT.

Hope you will find it interesting !

January 22, 2009

Obeo grid layout contribution

Open source projects are like plants.

Photo from A National Acrobat

As there is already some gardeners, there is no obligation to provide them with water, but I am convinced that giving some compost will help them to grow.

It could be feedback and help, translations ,articles, bugs tracking or patches.

Recently we contributed a generic grid layout provider for GMF runtime.
We hope it could be included in GMF, and people could benefit from it, as we benefited from both EMF and GMF projects.

Basically you inherit from the generic grid layout provider, and only define 3 parameters :

- the vertical padding
- the horizontal padding
- the number of columns

Here is an example showing the results with the GMF logical example, and 5 as value for each parameter.

Before arrange all.

After arrange all.