Friday, June 11, 2010

WC 2010 powered by EEF and Acceleo - Results and Rating

The first day is complete and results are online. Get the results with the menu "World Cup Results and Rating".


I'm glad to be in the first part of the Rating view ;-)

This post is also a reminder. Goulwen validates the 'forecast of the day' at 6am UTC. It's easy to come into the game. Come at any time! See the rules.


Last Call : Now boarding for the Eclipse World Cup 2010!

A bit of sweetness during the final Helios release build...

Want to play to the Eclipse World Cup 2010? Want to believe in modeling technologies?

Download it!

Goulwen posted the rules yersterday.

Exceptionally today (june 11th), you can play until the beginning of the first match!


Tuesday, June 8, 2010

Two billion years of software evolution

The Acceleo planet, the Modeling solar system, the Eclipse galaxy, and the software development universe...

The only conclusion that could be derived from a universe where everything moves away from everything else is that the universe constantly expands.

Today, more than 400 000 objects roam the solar system. The stars, planets and galaxies are in constant motion. The gravitational force acting on these celestial bodies, attracting them to each other, leads to collisions. 65 millions years ago, the impact of an asteroid on Earth has caused mass extinction of living species such as dinosaurs. In two billion years, scientists predict that our galaxy will be struck by Andromeda to form a single galaxy. Related to the origins and evolution of the universe, cosmic shocks created in the past affects the present and shape the future. The Dinosaur Extinction has probably cleared the way for us. Thus, we can also consider a collision as the beginning of something else...

Image courtesy of NASA/JPL-Caltech License

I posted this because it sounds like Eclipse plug-ins development and software evolution... Sometimes, you want to blow everything up, to go further... But, it's not easy to do...

The JDT has been re-written several times in ten years, isn't it? I think that the Eclipse XText version is really more cool than the old one. E4 will probably be a revolutionary development platform... What an exciting challenge to rewrite everything without losing the best of what you have already done? We've tried to do our best for the Acceleo MTL mutation. Now, thanks to the team, the new Acceleo version seems to be on the road... Thanks for all the positive feedbacks we have received about the collision between the Acceleo planet and the MTL celestial object. Where does MTL come from? the OMG galaxy!

I can't imagine how Eclipse could be in two billion years... It would be an ordered bloody mess, like the universe ;-)

Monday, June 7, 2010

How an Android file could become a code generation template in few clicks?

Let's take a simple Android metamodel with different kinds of Widgets, like Text, Spinner, Button...

Acceleo provides a way to customize quickly your Android code generator, and manage the different code generation alternatives. With the For/If menu item, you can apply a specific treatment to each kind of Widgets.

In the Java file which contains Android widgets declarations, select them and then right-click and run: Source > As For/If (Alt+Shift+F).


Each kind of Widget is isolated as a new code generation alternative.


Then fill the appropriate kind of Widget in each condition (This is the link between the metamodel concept and the textual alternative to produce for this concept).


Leave just one TextField declaration and delete the other ones. Complete it by changing the static name of Widgets with a dynamic Acceleo expression by using the Quick replacement tool.


Repeat for the other files. The Alt+Shift+F feature is more useful the second time you use it because it tries to fill automatically the alternative condition.


Acceleo 3.0 comes with an Android Tutorial. This is meant to give beginners a tutorial to get them started with defining their own code generators... and advanced users a way to discover some of Acceleo 3.0 features.

I have shown this feature at the Eclipse modeling runaway 2010 and some of you asked me to have more details...

I hope it will be useful for you.


Wednesday, June 2, 2010

1-minute fully-functional example for ATL and Acceleo


This message will help you to install and use ATL and Acceleo in 2 minutes or if you need to make a quick demo for your client or for your boss... Don't waste your time! Use the Modeling discovery UI of the Amalgamation project.

Amalgamation Note :

The Eclipse Modeling Package is a base and sound platform one can rely on for development tasks leveraging the modeling technologies. The Package is focusing on EMF and its complementary frameworks and tools : we call that the "base platform". That said the modeling community is way more diverse than that and provides complete IDE's for dedicated langages. Those are provided through the discovery UI.

Here is the easiest way to install and try the modeling technologies like ATL and Acceleo, by downloading the Amalgamation bundle :

The final release (June 23) will be available at http://www.eclipse.org/downloads

  • Use the modeling discovery button to install ATL and Acceleo

  • Examples are available for these technologies in the right-click menus New > Examples > Acceleo Plug-ins and New > Examples > ATL


  • Now, your workspace contains the new examples...


I will come back with some little information about the interoperability between these 2 technologies...

Coming soon...

Monday, May 31, 2010

The Acceleo editor provides refactoring actions and quick fixes

You can use the usual shortcut ALT+SHIFT+R to rename either modules, templates, queries, variables... in a coherent manner. This action can also be accessed from the menu Refactor > Rename. The interface will allow you to preview the changes before validating them.

Friday, May 28, 2010

Code Generation Patterns

The Acceleo IDE provides an extension point to help you to define your own code generation pattern proposals.

Here is an example available in Acceleo 3.0 (use the same way to define your own proposal) :


The extension point is org.eclipse.acceleo.ide.ui.proposal
The Java class implements "org.eclipse.acceleo.ide.ui.views.proposals.patterns.IAcceleoPatternProposal"

Generation patterns have been introduced in acceleo because we noticed that something that happens really often when developing code generators is the need to implement some behavior on an interface and all or part of its subtypes.

For example, let's imagine you are implementing a java generator from UML. What you want is to have a template called javaName which will generate the name of any classifier, with some default behavior and some specific behavior on classes and interfaces.

This is where the Generation Patterns view comes into play:
  • Locate the cursor in the template, at the position where you want to insert your javaName templates
  • In the Generation patterns view, select "[template] for all selected types" in the top part
  • Select the types for which you want to create javaName templates for
Note the bottom part of the Generation Patterns views presents a hierarchical view of the metamodel you are using. Each node represents a type of the metamodel and contains all of its subtypes. So, one type can appear several times in this view, one time for each of its super-classes or super-interfaces. When you select a node (by checking the combo-box before it), all its descendants are also selected by default, but you can uncheck those you don't need.


Once you have selected the types you need, go back to the editor and activate the completion by hitting Ctrl+Space. The first choice should be "[template] for all selected types", select it.


New templates are then inserted into you Acceleo module. They are called "name" by default but you can immediately rename them by just entering the name you want. All templates will be renamed simultaneously.


Here, Acceleo has done his job, now it's time for you to do yours: implement these newly created templates!