Don’t attend the Eclipse DemoCamp in Hamburg this Friday…
... if you're not interested in meeting local (and non-local) Eclipse enthusiasts and committers, learning something about Eclipse, Git, SWT, Qt, e4 and the iPhone, watching some nice Pixar short films in a cosy cinema, and frosty beverages.
Read more
iPhones on Mars
EclipseCon 2010 is over and as always has been a great chance to meet up with fellow committers and users of the software we build. Xtext has received a tremendous amount of attention: not only did we deliver several talks and tutorials on Xtext, but also did Xtext get mentioned in a number of talks we were not involved in. Xtext even received the Eclipse Community Award in the category "Most Innovative New Feature of Eclipse Project".
Read more
Eclipse DemoCamp Hamburg 11/2009
The Eclipse DemoCamp in Hamburg was a huge success - more than 110 people signed up and most of them actually showed up at the event:
The program was packed with interesting talks and we were lucky to be able to present some very well known speakers:
Read more
Xtext @ Google
Last week I had the chance to speak at the EclipseDay at the GooglePlex in Mountain View, CA, an event organized by the Eclipse Foundation and hosted by Google's Open Source Programs Office. Google is a truly amazing company and the GooglePlex is a very exciting place to be at. As I was one day early and needed a creative place to put finishing touches on my slides, I took the chance to visit Robert Konigsberg who was kind enough to host me for that day. The organizers put together a great agenda with lots of interesting talks. Looking at the agenda, you will see that there actually are three major topics, Eclipse in the Enterprise, Modeling and Runtime: The talks
- Eclipse in the Enterprise: Lessons from Google
- Distributed OSGi
- Deploying Successful Enterprise Tools
- Build and Provision
all dealt with how Eclipse can be used in the Enterprise or which challenges you will face if you start using Eclipse in large-scale scenarios.
Read more
Eclipse Modeling Day in North America
We (i.e. the Eclipse Foundation, itemis and Cloudsmith) are looking into arranging one more Eclipse Modeling Day in North America this fall and would like to gather feedback from folks interested in attending. Please use this poll to help us tailor a location and program to suit your particular interests:
http://spreadsheets.google.com/viewform?hl=en&formkey=dF ZQcGh3RDhrUUdyNTAtMXlVU2pKQ1E6MA..
Read more
Xtext does London
Marking the end of this years series of DemoCamps, Neil Bartlett and SkillsMatter are organizing the final DemoCamp in London on Monday 29th, 2009. Yes, that's next monday!
Neil was kind enough to invite someone from the "modeling/oAW folk", so Heiko Behrens will be giving an Xtext demo.
If you haven't had the chance to attend Code Generation 2009 or if you're curious what all this DSL talk is all about, I urge you to sign up for the DemoCamp now - it is free of charge.
I was fortunate enough to hear Heiko speak at the DemoCamp in Hamburg. Not only is Heiko a very good speaker (with a very convincing, deep voice), but also did he manage to come up with some very good examples of what a DSL is and why you should consider using them in your projects.
By the way, if you want to play around with Xtext before the DemoCamp, you can get a fresh copy from our download site at http://xtext.itemis.com.
Towels, Models and Bundles: Eclipse DemoCamp in Hamburg
Whether it was just pure coincidence or destiny - yesterdays DemoCamp in Hamburg happened to fall on the same day as Towel Day.
Although we had quite a bunch of attendees (I counted 40), only one brought his Towel.
Thanks to our speakers, Martin and I were able to put together a really exciting program:
- Moritz Eysholdt, Patching Models and Evolving Meta Models
- Heiko Behrens, TMF Xtext
- Simon Zambrovski, Common Navigator Framework
- Marco Mosconi, Modular EMF/GMF customization with ObjectTeams/Java
- Markus Alexander Kuppe, Distributed OSGi (RFC 119) - The ECF way
Moritz presented the result of his master's thesis on the topic of metamodel evolution and explained how models can evolve together with their metamodels. This might also be of interest for data modeling.
Heiko delivered a great presentation on the upcoming version of Xtext. He used a well-known example that everybody could relate to (no, not entities and services!) so it was really easy to understand how domain specific languages work and how Xtext can help to implement a domain specific tool chain.
Simon presented on the Common Navigator Framework - a powerful framework which helps you to assemble tree views in a mostly declarative manner. Simon was bold enough to do a live coding session, but the demo gods didn't smile on him, so he showed us the prepared solution, which was still very convincing. Simon prepared an article about the CNF on his blog, so if you're interested, drop by - it's worth a read.

After the break, Marco Mosconi showed how ObjectTeams/Java can be used to non-invasively customize generated code. As a real-world example he used the UML diagrams from the Eclipse UML2Tools project. The UML2Tools project uses GMF to generate the diagram code based on the UML2 metamodel (implemented as an ECore model). A rather large number of generated artifacts have to be customized to make sure the diagrams behave correctly. Marco showed how this is especially required for associations (I find it kind of funny how everybody uses associations to explain how complicated the UML metamodel is). The UML2Tools class diagram has been customized in at least 200 different locations, so you get a big maintenance problem (generated and non-generated code are mingled). With ObjectTeams, it is possible to extract all customization code into so called teams which then are able to enhance the generated code in an aspect oriented way. In a way, ObjectTeams is like AOP on steroids.

The official part of the DemoCamp was concluded by a talk held by Markus Kuppe on Distributed OSGi. Markus briefly explained the architecture behind Distributed OSGi and gave a demo of an Eclipse RCP application that communicated with an iPhone (which ran an Equinox server). Markus used the Eclipse Communication Framework (ECF) to achieve this - ECF contains a provider for Distributed OSGi.

Eclipse DemoCamps are social events and aim at creating room for discussion and interaction. So, after the official part of the DemoCamp, we headed down to the EAST Bar to have some nice chats over some frosty beverages (I definitely recommend "Cool Mango").
Feedback has been very positive so far and I surely hope everybody enjoyed the DemoCamp as much as I did. Thanks to the Eclipse Foundation, it-agile and itemis for making this event possible by sponsoring the location and the drinks!
If you feel you missed out, drop me or Martin a mail so we can invite you the next time around.
Modeling is dead. Long live Modeling!
Although some people seem to be convinced that Eclipse and Eclipse Modeling are dead, I have been sensing quite healthy life signals of both on EclipseCon 2009 (or rather #eclipsecon).
On Monday, Bernd, Kenn and I hosted the official Modeling BOF:

The topics discussed were focussing on consumability and long-term sustainability of EMF:
Documentation and Marketing
We all agreed that the entire modeling project lacks a decent documentation. While of course all of the projects and subprojects do have their own documentation, there is so such thing as an overview documentation. Modelers as we are, we quickly realized we're lacking a documentation superstructure. The idea is to provide a guide for users (newbies and seasoned experts alike) to navigate the Eclipse Modeling world. The modeling project offers a great variety of technologies, so it is not always easy to find out which set of technologies / frameworks you might want to use - especially if you are new to EMF.
We also agreed that we need more success stories (in the form of blog entries, articles and shiny flyers for the modeling landing page). A quick poll revealed that more than 90% of all people attending have been working on projects in which modeling was successfully applied, so there should be enough material to create success stories!
Kenn mentioned the Eclipse Foundation wants to start a documentation project (much like Babel) to improve overall documentation, we might eventually join this project. In the meantime, we decided to form a working group comprised of members of the Eclipse Modeling Project that starts to create this overview documentation. The initial members of this working group will be Kenn, Bernd, Peter, Tamer, Pierre, Marcello, Thibault and Anthony (guys, please send me your email addresses). The working group will start its work on the EMF dev mailing list. You are welcome to join us there.
Consuming Modeling Technology
I think there is no other technology that causes more emotions in an Eclipse committers life than P2. So we also had our little discussion about how to best provision Modeling technology. No big news here - we just re-iterated the pros and cons of using ZIPs vs. P2 and also had a short discussion about the Friends of Eclipse Download Wizard (which, rumor has it, will allow you to assemble a custom distro by just selecting the pieces you need). Several people mentioned that Amalgamation is intended to be a place for modeling distros.
EMF 3.0
We also discussed whether we should have a new major release of EMF that allows us to break API. Though not everybody agreed that we need a new major version (because the current version works smoothly for most people) we decided to set up an additional BOF to discuss this topic in more detail. I will write about the EMF 3 BOF later (yes, I am teasing)
Miscellanea
Someone asked if we need something like a model bus, the answer was no - we've got the modeling workflow engine (MWE).
We also briefly discussed the recent change of leadership on the MDT OCL component (Christian Damus revoked his committer and component lead status recently). Everybody agreed that to lead a component, a long-term committment is needed (which has been met by Christian in the most excellent way). We also agreed that we need to make avoid situations in which a whole bunch of projects / components suddenly are without a leader. This will be a task for the PMC.

After the official part of the BOF, there still was time to chat and shake hands with people you never met in person before. I had the pleasure to shake hands with Anthony Hunter, who works for IBM. From our discussions on mailing lists and bugs, you could guess that we have a totally different view on the marketing of software, but it turns out we're actually not that far apart
BOFs are a great way to interact with like-minded people at conferences. So, next time you go to a conference, make sure you participate in a BOF to make yourself be heard and take part in the discussion.
Using Xpand in your Eclipse Wizards
At ESE, I had a nice chat with Chris (actually, I had a lot of nice chats with a lot of nice people - it was quite a challenge to attend any of the sessions), who told me that he was looking into template engines. I leave it up to you to make any assumptions on why he's interested in template engines. I happen to know at least three template engines: Velocity (which I had the joy of using in my active days at AndroMDA.org), the template, erhm, ... mechanism being used in PDE (I once fixed a bug which had been caused by this engine) and - you might have guessed it - Xpand (which I am a committer on).
So, I gave a short demo of Xtext and Xpand to show Chris how easy it is to create (model-aware) code generation templates. Xpand comes with a nice editor which makes template editing a joy - it features code highlighting, hyperlink navigation, model-awareness and other editor goodness.
Instead of letting only Chris know how that works, here's a short guide on how to write your own Xpand template and use it in a wizard. To make the example more realistic, I chose to implement a wizard that creates an Ant build.xml file for a simple project (something which is missing in Eclipse, AFAIK). So, here we go.
Prerequisites:
- Eclipse 3.5M3 (3.4 might also do)
- EMF 2.5.0M3
- EMF Compare 0.8.1
- MWE 0.7.0M3
- Xpand 0.7.0M3
How to do it
- Download and install the prerequisites.
- Create a new plug-in project named "de.peterfriese.antwizard"
- Add a New File Wizard to the project. I used the Custom plug-in Wizard to get me started.
- Brush up the wizard page and add some fields for project name, source folder and binary folder.
- We want to transfer the values entered in this wizard into our template, so we need to create an Ecore model that describes our data model.

- Add org.eclipse.emf and org.eclipse.emf.edit to the dependencies of you plug-in.
- Create a genmodel and let EMF generate the model code for you.
- Add code to your wizard that transfers the values from the input fields to your model. One might consider using databinding for doing this, I used a straight forward read'n'write approach for the time being:
public boolean performFinish() { final String containerName = page.getContainerName(); final String srcDirName = page.getSrcDirName(); final String binDirName = page.getBinDirName(); // ... } private BuildSpecification createModel(IProject project, String srcDirName, String binDirName) { BuildSpecification buildSpecification = BuildspecificationFactory.eINSTANCE.createBuildSpecification(); Project projectSpecification = BuildspecificationFactory.eINSTANCE.createProject(); projectSpecification.setName(project.getName()); projectSpecification.setBinaryFolder(binDirName); projectSpecification.setSourceFolder(srcDirName); buildSpecification.setProject(projectSpecification); return buildSpecification; } - Create an Xpand template de.peterfriese.antwizard/src/template/BuildTemplate.xpt:

In case you wonder how to get those funky characters: make sure us create this file using the Xpand editor - it has code assist (CTRL + space) for those characters. - Create an Xtend file de.peterfriese.antwizard/src/template/GeneratorExtensions.ext:

- Add org.eclipse.xpand, org.eclipse.xtend and org.eclipse.xtend.typesystem.emf to the depencies of your plug-in.
- Finally, we need to provide some code to invoke the generator:
private void generate(BuildSpecification buildSpec, IProgressMonitor monitor) throws CoreException { // get project root folder as absolute file system path IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); IResource resource = root.findMember(new Path(buildSpec.getProject().getName())); String containerName = resource.getLocation().toPortableString(); // configure outlets OutputImpl output = new OutputImpl(); Outlet outlet = new Outlet(containerName); outlet.setOverwrite(true); output.addOutlet(outlet); // create execution context Map globalVarsMap = new HashMap(); XpandExecutionContextImpl execCtx = new XpandExecutionContextImpl(output, null, globalVarsMap, null, null); EmfRegistryMetaModel metamodel = new EmfRegistryMetaModel() { @Override protected EPackage[] allPackages() { return new EPackage[] { BuildspecificationPackage.eINSTANCE, EcorePackage.eINSTANCE }; } }; execCtx.registerMetaModel(metamodel); // generate XpandFacade facade = XpandFacade.create(execCtx); String templatePath = "template::BuildTemplate::main"; facade.evaluate(templatePath, buildSpec); // refresh the project to get external updates: resource.refreshLocal(IResource.DEPTH_INFINITE, monitor); }
That's it!
Taking it for a spin
- Launch a runtime workbench by selecting de.peterfriese.antwizard/META-INF/MANIFEST.MF and invoking Run As -> Eclipse Application
- Create a new Java project in the runtime workspace.
- Invoke your wizard by selecting File -> New -> Other... -> Ant -> Ant build file from existing project
- Enter the required information (project name, source folder, binariy folder)
- After clicking on finish, you should get a fresh Ant file for your project:

- Enjoy!
You can download the project here. Feedback and comments are welcome!
ESE: Building Refactoring Tools with LTK and Ludwig
Jeffrey Overbey talked about building refactoring tools using the LTK and his research work "Ludwig".
I guess you all agree with me that refactoring support is crucial for any programing language, as you need to restructure your code rom time to time.
Although Eclipse LTK offers a decent API and UI to realize refactoring tools, all the heavy lifting (parsing the text in question, analyzing the AST, creating rewrite rules) is left to you.
Jeff's research tool Ludwig can help to derive refactoring support from a BNF-style grammar very easily. Ludwig essentially derives a lexer/parser from the grammar and provides an interface to the AST which gets constructed by the parser. Which gives you the chance to walk / visit the AST and (partially) rewrite the AST.
I really enjoyed Jeff's presentation style. He used a set of slides and pre-recorded screenvideos to drive his talk. I think this is great idea, as it basically eliminates any problems you might run into if you do a live demo. Plus, it gives the presenter the chance to face the audience while demoing, instead of mumbling into the screen







