EclipseCon Europe 2017 – Part 2

This time I really had to split up my look back to EclipseCon Europe into multiple posts. In my previous post I wrote my rememberings on ECE 2017 before it actually began. It was about my arrival and first meetings with the community, the Unconference on Monday and the reception and networking at the Nestor bar.

image-uploaded-from-ios11.jpg

On Tuesday it was finally time to open the doors for EclipseCon Europe! It is already beginning at the reception and wardrobe where you meet lots of people and welcome them. Of course there is not much time then, but I was looking forward to find more time for chatting later.

Preparing for showtime

Tuesday morning is the tutorials slot. I would have liked to join Mickael Istria’s slot on the Language Server Protocol and Eclipse’s Generic Editor. This is definetely a topic where I will bring my experience in and will contribute to. Instead, I chose to prepare for my first talks on that day.

All itemis colleagues met at our booth and we built it up together. The booth played a central role for us later and we wanted to make it an interesting place to be for attendees also. And hey – we had stickers this year again! I ordered them recently and improved my Gimp skills to make them free form cuts. The quality is good, and now we know where to order good ones.

IMG_4663.jpg

At noon it was time to meet up again. Not sure with whom I joined that day. I think it was Tuesday where I joined Lorenzo Bettini and Francesco and Vincenso from RCP Vision. Or already Monday? I have an information overload to get this correct in a row.

Keynotes

After lunch it was time for the opening keynote from Mike Milinkovich. But before that, Ludwigsburg’s mayor gave an insight on Ludwigsburg’s history. You may have read it, the Eclipse Foundation and Ludwigsburg agreed to keep EclipseCon Europe further for at least two years there. Good choice. The location is just perfect for this conference.

Then it became time for Mike to welcome the audience and have an outlook on the future of Eclipse. These are exciting times, many projects are joining the Eclipse Foundation. With the move of JavaEE to EE4J at Eclipse, not less than 40 new projects are pushing in, and GlassFish alone has 130 git repos. It will be a challenging task to spark this project. I don’t want to get into the details now, but OpenJ9, Deeplearning4J are other awesome projects at the Foundation now. Eclipse Science is also getting things rolling and are successful on their own release train now. The Eclipse IDE supports now Java 9 and JUnit 5 and has been added to Eclipse Oxygen.1a and Photon. The Eclipse Public License 2.0 has been released this year, and JUnit 5 was the first project licensed under EPL-2.0.

IMG_4665.jpg

I have to admit that I was distracted during Anna Ståhlbröst’s keynote then. I partially followed and enjoyed how she presented live in Luleå, near to the polar circle in northern Sweden. The reason for distraction was that it was immediately after the keynote time for my next talk.

itemis Booth Talks

Now it was finally time for an idea that we had for our booth. The idea was to use our technical and presentation skills and give short talks at the booth. The short break between the keynotes and the afternoon talks was used by Lothar Wendehals, and he showed in just 5 minutes how to program an embedded system with our YAKINDU Statechart Tools. And it took not more time until he programmed an Arduino to do something which he modeled as a finite state machine.

screenshot 130

Showtime!

In “Introduction to Expression Languages with Xtext” I showed how to build languages in Xtext that embed expressions. There is Xbase, which can be easily consumed and implements a fully-fledged base expression language. So why not just use Xbase? There are reasons sometimes not to do so. Mostly because of three reasons: Performance, the need for another typesystem (Xbase is bound to the Java typesystem), or when no dependency on JDT is required.

screenshot 21

But you can learn a lot from the Xbase grammar. When you look at this grammar, it seems complex and makes much use of some more advanced Xtext grammar concepts like Syntactic Predicates or Assign Actions. Many Xtext users are not aware of that, or don’t understand them. So I explained them and where to use them, and I showed some patterns that any expression language follows in Xtext. The patterns are not that visible on first sight, but I gave another view on them.

With a slight delay because of after-session discussion I joined Martin Lippert’s talk “Implementing Language Servers – the Good, the Bad, the Ugly“. Martin did a great presentation about lessons learned from implementing and using multiple language IMG_4666servers, and the state of the LSP. If you are interested in LSP and missed it, look for the recorded session. I gave Martin later direct feedback on his good performance (as he always does).

It was right before the first session when Dominik Mohilo from jaxenter.de showed up. He is continuously reporting interesting stuff in his online articles for years now, and helping Eclipse to get more intention in the developers’ minds in Germany. Thus I really value his work and was excited to finally meet him in person. Many thinks about Eclipse I read from him first, because they show up in my Facebook timeline and often I read those articles. He was even more excited to finally meet the drivers behind Eclipse in person. He wrote already a good wrap up about ECE 2017 for his Eclipse Weekly newsletter (german).

News on Photon, GEF and the Jigsaw

I invited Dominik to join our next ignite talks. Now it was my time to present brand new stuff. I showed some of the things that were added from Photon milestone 1 to 3, and even some of the things that are just about to come by my contributions. Besides some nice usability features and now fully working dark theme, I showed one of the most important things that users can await:

screenshot 131

I am investigating from time to time where I think Eclipse could perform better and if I have ideas on that. Some additions that I am proud of are the “Expand All” action in the Search Views’s tree. I showed both Oxygen and Photon for a search result of ~5000 elements, and the improvement is at least factor 2. Also in this demo you could see another nice feature coming for macOS: The wait-cursor was an ugly black/white circle. I found a hidden gem in macOS to get an animated system cursor. Actually it is so hidden that you just hear rumors on this blue spinning ball on the net and almost find no pictures of it with a Google search. It is not documented, but I found a hint for it in a source file of macOS. I think it looks now much nicer.

Also the improved speed of progress monitor updates I could show in difference between Oxygen and Photon, which is just amazingly faster now. You will recognize this for example if you import projects from the Git Repository view. At the moment I am analyzing the performance of the (Java) text editor and have some patches pending. On my machine it feels already snappy again. I think the conference attendees around enjoyed my performance.

screenshot 132Next it was Alexander Nyßen to talk about “How we saved GEF from the Jigsaw”. To the luck of the GEF project they were one of the very early adopters of Java 9 and tested what implications Java 9 brought for GEF. They wanted of course to assure that GEF will be compatible to Java 9 once it is out, and found some issues. And they got in direct contact with the guys from Oracle to request some changes GEF and others would need. Users of GEF can be happy now, GEF works smoothly on Java 9!

My afternoon talk schedule

IMG_4667The next session I attended was Andreas Graf’s presentation “Large Scale Model Transformations with Xtend“. As written in my previous post, model transformations are one of the main use cases for Xtend, but only known by a few people. Andreas is working in the automotive sector, where you usually have VERY large models, sometimes hundreds of megabytes in source. Transforming them is challenging, and they initially did an evaluation on different technologies (e.g. QVT-O). They finally decided to use Xtend. Some of the reasons were Xtend’s performance and debuggability. Did you ever tried to debug an interpreter on a large model? It’s horrible. With Xtend you can just debug the code and also down to its transpiled Java code. And they do not experience serious bugs with Xtend.

I skipped one slot and went to our booth, where I joined some discussions with attendees and colleagues. Then it became time to listen to Olaf Gunkel’s talk “the Future is async – or Java Concurrency in the change of time“. He explained concurrency programming from Java 1.0 to Java 9, and the different paradigms. I actually learned quite something about the newest stuff, reactive streams. Also Completable Future I do not use frequently – until yet.

img_4668.jpg

Eclipse Stammtisch

That was the last talk for Tuesday and finally time to get beer at the Stammtisch, which took place in the theater’s foyer where our booth was. We made a small “flash mob”: All of us got the same T-Shirt, one with the funny bunny we had on our rollup at EclipseCon France. And suddenly it could be recognized how large the itemis crowd was. Around 20 persons from itemis, from which 8 were speakers with 12 talks.

It must have been a nightmare for the EclipseCon’s program committee to choose from so many talks. Of course they will tend to provide a diverse program and don’t let single companies a too big focus. But that we were able to give 12 talks shows that they believed in the quality of our content and presentation. And no, we had no one from itemis at the program committee.

I could not remember to whom I spoke at the reception all to, but one was different: I met Brian de Alwis, who made all the way from Canada to EclipseCon Europe. It was at EclipseConverge & DevoxxUS where I got to know him. We had the same shitty over-expensive hotel and met at breakfast. It was always refreshing to speak with him, a very nice guy. Actually it was him who partially sparked my interest to contribute to Eclipse Platform. The story behind would be worth another post.

The real conference

The party was of course not over when the last beer was served at the reception. It just begun. Of course it was again time to go over to Nestor, drink more beer and talk with all the Eclipse members that were joining there. At the bar there is happening the real conference. This is were you really have time to talk and learn to know new people. Year by year it gets more. At 1:30 AM I finally got to my room.

Oh gosh, and this was just Tuesday! Wednesday would become even more intense, read about that in my next post. Our slides are available for download now.

 

 

Advertisements

Next stop: EclipseCon Europe 2017

As every year EclipseCon Europe is fixed in my schedule, and I am excited to go there. It is a melting pot for the Eclipse Community, a big family come together. I am in the last preparations before departure to Ludwigsburg, and can’t wait to finally go there.

FullSizeRender.jpg

itemis is of course sponsoring EclipseCon Europe, and we will have a booth in front of the theater. With 12 talks, 8 speakers and about 20 attendees I am expecting that the it(emis)-Crowd is again the biggest party at EclipseCon Europe. The itemis booth will be the place where you will have the highest chance to meet me, but of course there is plenty of time to meet each other.

Meeting the Scout and Modeling community

As in the past years, I will start my journey already on sunday. I will again join the Eclipse Scout community’s pre-conference dinner at the Rossknecht. The past years I was joining on monday the Scout User Group meeting, but this year I committed to join the Guided Tour on Eclipse Modeling at the Unconference. At 14:40 I will give there my first talk, an insight on the Xtend language.

 

Xtext and Platform development

This Friday, Oct 20th, Xtext 2.13 was released finally and I have invested quite some time in the past months to find and resolve bugs. I have worked intensively with the Eclipse EARI system, and investigated together with Christian Dietrich the problem reports we are getting in. Until we now managed to get less problem reports in than we are processing. Christian and I are those who care most about user problems and we have fixed together the majority of bugs for this and the past releases. Christian does an incredible job! We will happily share insights on the current state on Xtext at the Unconference and all conference days.

The past months I starting getting involved into the Eclipse Platform itself. While before I completely focused on Xtext development and just used the platform, I thought it was time to give something back. I am using Eclipse every day and still love to work with it. I am recognizing that others prefer other IDEs, or even new ones are built, and there are reasons for that. But still for complex development tasks I believe that an extensible desktop IDE like Eclipse is the best tool. Eclipse has some flaws, and I could help there. Now I am frequently contributing to the Eclipse Platform (with focus on performance, usability and stability) and found into the development process, which took me some time. Because of this engagement I am expecting to have some interersting talks on platform development with some driving persons like Lars Vogel, Dani Megert, Alexander Kurtakov, Mickael Istria, Mikaël Barbero or Andrey Loskutov. I have to thank them for guiding me in the process and reviewing my changes carefully. Guys, I owe you a beer at the Nestor bar!

A conference day (almost) never ends

Nestor bar, the place to be after the long conference day! You will find me there each evening from monday on till late. Like every year it will be hard to celebrate long and get up early. But be sure, I’ll manage that. It isn’t the first time, and won’t be the last. The party ain’t over until it’s over.

I’m not staying at Nestor; like last year I reserved early a room at the nearby Villa Forêt. It is just a 5 minute walk (and some walking does not harm) and fine for me. It was in this hotel where I met Philip Wenig some years ago at breakfast. Ever since then I had nice talks with him and I always enjoy that. This year I already met him twice: At the Eclipse DemoCamp in Zurich, and at Eclipse Hackathon Hamburg.

Talks at the main conference

This year, besides my Xtend talk at the Unconference, I will give 2 talks at EclipseCon:

screenshot 21.png

“Introduction to Expression Languages with Xtext” (Tuesday 14:30, Silchersaal) will give you some patterns in Xtext grammers when you need to embed expressions in your language. Xtext ships with Xbase, which is a full expression langauge that you can easily integrate, but sometimes Xbase is not the right choice for you. Xbase is tightly bound to the Java typesystem and JDT, and for your language this could be undesired. Then you have to build your own expression language, which is a bit advanced. But you can learn a lot from Xbase, and in this talk I will show some grammar patterns that you could take from Xbase. I already gave this talk at EclipseCon France this year, so most of the slides are fortunately prepared.

screenshot 20.png

Different for my second talk: “Advanced Oomph Setup Authoring” (Wednesday 12:00, Silchersaal). This is completely new, and I am right now working on the slide deck. I was responsible for developing Xtext’s Oomph setup, which is compared to other setups at Eclipse more complex. But I have learned much from the other setups. Again, there are some patterns that can be recognized among the different setups. I will show and explain screenshots from different setups and discuss some advantages or disadvantages from then. Oomph is a mighty framework, and creating good setups is a time consuming and error prone work. The information given in this talk should give some help to author more robust setups, and build them faster. Advanced Oomph users might recognize that they do already much right, but even they might get the one or other idea to enhance their setups. Users rather new with Oomph will get the most out of this talk. They should at least have a basic idea about Oomph project setups.

Lightning Talks at the itemis booth

This year we will give some 5-Minute Lightning Talks at our booth in pauses. We have a lot of interesting small talks this time, from Xtext to Java 9, and even where plastic plants play a role. Just come around to the exhibitor’s area in front of the theater and get some inspiration.

Also here I have 2 slots:

  • Tuesday 15:50: “What’s new in Eclipse Photon?”: Let me show you a sneak preview on some features coming in Photon. You will see some of my contributions and some other.What's New in Eclipse Photon.001.jpeg
  • Wednesday 15:20: “A committer’s view on Eclipse Automated Error Reporting”: As said before, AERI helped me a lot to improve Xtext and Eclipse Platform. I’ll show you what committers see from problems reported to it and how it can help to find bugs. Also, a big Thank You to the guys from Codetrails for the support!ACommittersViewOnEARI.001.jpeg

Follow @itemis on Twitter to get notice on further talks from us!

The most important thing at EclipseCon is…

the people! I love to meet all the people again, from which most of them I only see once a year. This year I have already attended Eclipse Converge/, DevoXX US and EclipseCon France, so some of you folks I have already met again. But EclipseCon Europe is by far larger and more intensive. To all the people I already know, from year to year they become more.

Eclipse on the roll

It is a pleasure to see which companies and projects joined the Eclipse Foundation recently. Since I have a background in Java Enterprise development from early beginnings (yes, I had to implement bean managed persistence with EJB 1.0 in the ancient days and it was NOT funny!), I was delighted to see EE4J at Eclipse. Then IBM’s J9, Deeplearning4J, and the story is not over yet. If this continues, the Eclipse Foundation has a bright future and I am glad that itemis is a driving part of the story.

For this year’s EclipseCon Europe some of this hot new stuff might come a bit too late, but I expect more talks related to these exciting technologies next year. Yes, there are already some talks, but I think the focus will shift from now on.

And finally: Time to rest

After EclipseCon I’m taking a week off. I need this already, and will desperately need this after this exciting and exhausting week. Back to my beloved family, who is awaiting me after a long week. Who knows, maybe my second daughter Sophia is walking then? Can’t be long anymore.

 

EclipseCon Europe 2016 – I’m coming!

130x130 I'm Speaking logo

I’m sitting now in the train on my way to Ludwigsburg. For sure I cannot miss this great event, where so many smart people and friends come together. Although ECE is always at the same time of the year and I knew for long that I want to go there again, it comes not at the best time for me – or better: for my family. The reason is a really positive one: Almost 3 weeks ago on October 4th I became for the second time father of a lovely daughter, Sophia.

IMG_1433.jpg

I am missing her already deeply, and my wife would need some supporting hands at home right now. However she understands that EclipseCon is important for me and supports me. The past weeks I did not get much sleep, but the reason was mostly not Sophia, but mainly preparing my talks – in the late evening and night it was most suitable. I will definitely enjoy EclipseCon, but this year I will also be happy when I can leave towards home again and will take 3 days off afterwards for regeneration and caring for the family.

This year’s EclipseCon will be fully packed for me. Today, on Sunday, it will start with a small pre-conference event at the Rossknecht, where the Eclipse Scout community comes together. Tomorrow at the Unconference day I will attend the Eclipse Scout User Day, which I attended the past two years already. At the moment I do not work with Scout, but I really enjoyed working with this framework in the past and would like to do another project with it again. The recent year Scout has much evolved, and I am keen to learn all the news.

On tuesday the Xtext developers plan to schedule a BoF Session. A beta of Xtext 2.11 was released this week, and we have to work much now to make the 2.11 release round. I plan to invest quite some time on this, and we have to talk about the concrete tasks and collaboration. Since we are now a team spanning several companies, it is important to have the chance to get the whole team together at EclipseCon.

On wednesday it is time for action. I was recently contacted that the proposal for the session “Recipes to build Code Generators for Non-Xtext Models with Xtend” got picked from the waiting list. I will perform the talk with my colleague and friend Holger Schill.

screenshot 68.png

We give this talk because Xtend is a very nice language when it comes to developing template based code generators, but is mostly only used in the context of Xtext. Xtext projects seamlessly integrate a generator infrastructure with Xtend, but it is not that common to use Xtend based generators with models that are not Xtext DSL files. We will show how simple it can be to integrate Xtend for other use cases, e.g. with JSON as input.

After that talk we will participate at the Modeling Symposium (17:45 Theater Stage). There we will shortly (7 minutes slot only) present a generator fragment that creates an extension package for VisualStudio Code to embed support for a DSL with an embedded language server. The Language Server Protocol support is the main feature for Xtext 2.11. We plan to contribute the created generator fragment to the Xtext project.

On thursday it is time for my talk “From stairway to heaven onto the highway to hell with Xtext” (11:00 Theater Stage). In this talk I will explain why I love Xtext and why it is used successfully in so many projects first, but then discuss where users have or run into trouble when using the framework. We see in many projects that first steps are easily done and don’t require much experience, but as requirements grow the complexity of DSL projects also grow and extensive experience with details of Xtext and the technologies behind is crucial. I hopefully compiled an informative set of issues.

screenshot 69.png

One Xpand user less, one happy Xtend user more

This week I am consulting a customer who had introduced a model based development approach based almost 10 years ago and used it with success since then. At the time back then Xpand was the most powerful code generation engine and UML models were often used to generate code from. Xtext did not even exist at that time. The customer uses Enterprise Architect and the Enterprise Architect exporter from the components4oaw. The last release was in 2011 and the project has not been developed further. For my customer the component just did what it should, so there was no direct need to change anything at the process. The EA exporter has its flaws, especially since it needs an Enterprise Architect installation and this means it only works on Windows machines. For Enterprise Architect users who do model based development, we therefore offer the YAKINDU Enterprise Architect Bridge, which scales better and can process .eap models on any platform.

My task was to help the customer to modernize their tool chain. To be fair, Xpand is not the right choice anymore. The Xtend Language combines the strengths from Xpand (great templating support, functional programming, static typing, polymorphic dispatch, mature Eclipse tooling) and resolved some weaknesses (performance, compiled code instead of interpreted, Java integration, extensibility of expressions).

For the customer who never had used Xtend so far, but was quite familiar with Xpand, it was quite a surprise how close both languages really are. Most of the concepts can be mapped 1:1 from good old Xpand to Xtend. We created a small generator from scratch and copied functions and templates and translated them manually for demonstration. They understood Xtend within minutes then. Most of the work is monkey-see-monkey-do. For such cases I wrote a small migration script which can translate Xpand,Xtend(1) and Check code to Xtend(2) classes. We used that script now for an initial translation.

One of the reasons why this migration script is not published is that cannot translate Xpand code completely to Xtend. The tool parses Xpand templates and traverses the AST to transform the expressions to Xtend equivalents. But it does not know about the type system which is used by the generator.

And here Xtend is not as powerful as Xpand, especially when using UML. In Xpand, the UML type system adapter analyzed the applied profiles of a model to create virtual types for stereotypes. Elements with stereotypes applied can be processed as if they were of a subtype of the extended type, and tagged values became attributes. In Xtend, there is only the Java type system, and for processing UML models this means that templates have to use the UML metamodel directly. The old “feeling” of a real type system can be simulated with a set of extension functions. I usually introduce an extension class per profile which offers for example a method per tagged value. The creation of such an extension class can again be automated by generating it from a profile .uml model.

Another disadvantage against the Xpand framework is that Xtend is not a code generation framework, but a general purpose programming language. How a generator component looks like that invokes the templates, where to produce output to, how to integrate constraint checks, this all is not provided.

What I usually do here is to use Xtext’s infrastructure like the IGenerator interface and validation based on Xtext’s AbstractDeclarativeValidator and @Check annotations. I reuse Xtext’s MWE Reader and Generator component. However, this requires some work and advanced knowledge. The basic approach is here to make UML models recognized by Xtext as a generic EMF resource. To actually use the Xtext components, a generator specific Guice module has to be created which extends AbstractGenericResourceRuntimeModule and satisfy several dependencies which an Xtext language already as configured by default. A good part of the approach was described by Christian Dietrich in his blog posts “Xtend2 Code Generators with Non-Xtext Models” and “Xtext 2.0 and UML“. I may go into details in a later blog post.

Although Xtend is such a natural choice for writing code generators and it is so well-integrated in the Xtext ecosystem, there is framework support missing for non-Xtext models. It is easy to write a trivial framework, but why should everyone start writing their own when good infrastructure already exists in the Xtext framework? From what I experienced again, there is need to have some more framework support for this use case. I doubt that it could be part of Xtext itself, but maybe we will provide a framework for Xtend based code generators in the future.

At the end we were able to show and demonstrate a migration path in one single workshop day. The customer was happy to save several days or weeks of time. The workshop costs were compensated by far for them. From a sales perspective it might not be wise to leave a customer in a state where he is not dependent on our services in the next time, but this is not how we work. For me it feels right.

Give a man a fish and you feed him for a day; teach a man to fish and you feed him for a lifetime.

Preparations for CodeGeneration 2013

As I am addicted to code generation and DSLs, the CodeGeneration conference in Cambridge is always a must each year. Last year I could not make it, since I had the chance to speak at EclipseCon North America, which was in the same week. This year Mark took EclipseCon into his considerations (it was last week), so me and my colleagues from itemis will be there again. Actually, this year we will be more itemis guys then ever. Mark already assumed in his opening words at CG2011 that almost everyone from itemis would be there, this year we prove itemis is larger. I think our company is so close related to the conference theme that it is natural that we have lots to present, and much interest to hear others about what they are doing and have learned in the past.

screenshot 2013-04-05 um 10.55.19

Before the actual CodeGeneration conference starts on Wednesday, there are some pre-conference activities. My colleagues Holger Schill and Moritz Eysholdt will hold an intensive 2-day Xtext workshop on monday and tuesday.

I will arrive monday noon, since I take the early flight directly from my hometown Dortmund to London Luton. From there, I have to take a 2 hour bus trip to Cambridge. In the evening, I plan to meet Holger, Moritz, Meinte Boersma and hopefully some others in the Castle Inn pub. When you arrive on monday, drop into the Castle Inn roughly at 20 PM (I guess we go to a restaurant before). You can reach me there on my mobile phone: screenshot 2013-04-05 um 12.30.02

DSC00412

On tuesday this year’s Language Workbench Challenge summit takes place. We have 14 submissions (wow!) for the LWC13 assignment. I have been working on the Xtext submission together with 2 colleagues, Johannes Dicks and Thomas Kutz. The results are available as open-source project lwc13-xtext at Eclipselabs. We have prepared a detailed step-by-step tutorial as submission paper. The resulting document LWC13-XtextSubmission.pdf is available for download. On the project homepage I have placed today a quick start tutorial. Oh boy, this project did cost some time. The actual solution is not much code, but as often, it is harder to write less code than more. It could be even less, but we took care of that the code is readable and understandable. And writing the document is at least that much work as the implementation.

screenshot 2013-04-08 um 13.52.06

Every presenter has only 15 minutes to present their approach. 15 minutes presentation for that much work. I guess that the other participants did invest also quite some time. Both of my co-authors got the chance to visit the conference, and Thomas will support me with the presentation. He will demo the resulting JSF application and DSL source code while I do the main talking. We did a test run of the talk yesterday evening, and easily exceeded 20 minutes. I think Angelo will bring his egg timer again, which begs no pardon with the talk time of speakers. But only that way we will be able to run 14 talks on one day. We will have to restrict on the most important aspects only.

Besides my colleagues Thomas and Johannes also Sven Lange will join us then. I have the pleasure to work with him in my long-time project at Deutsche Börse (German Stock Exchange), now since over half a year. Sven is a highly motivated, skilled and smart person. It is still the same project I have reported about at CodeGeneration 2009 together with my former colleague Heiko Behrens. Sven is full-time working on this project, while I am for 20% scheduled. We have migrated here a huge code generator project from Xpand to Xtend. This alone would be worth an experience report session. Sven is working on Xtend support for IntelliJ, which he might present in a Lightning Talk on wednesday.

Wednesday the conference will start. I will have my main talk “Alive and Kicking with Code Generation” together with Dr. Boris Baginski from ATOSS Software AG after lunch at 13:45.

screenshot 2013-04-05 um 10.57.34

Currently we are finalizing our presentation slides. Boris has been ill for some days and busy with a new release of their ASES product, a workforce management suite. This is really an interesting customer and project. They are evolving this product now for 25 years, and they make use of code generation for ages. I think one can say that it helped them to survive in their business, some contestants did not manage to make larger platform shifts and died. Most of them tried a big-bang replacement, but the business is too fast evolving so that the target is moving steadily. Boris and I will speak about this product and how it has been evolved over the years. ATOSS was one of the first major projects using openArchitectureWare 4 (which mainly means Xpand), and now they are currently preparing a shift to Xtend.

I am glad that this talk is already on wednesday, I never come to rest until I finished some talk. After it, I can just relax and enjoy the conference. I am expecting some interesting insights on different approaches. Especially experience reports are interesting for me. I did not finally decide which sessions I will attend. At the moment I plan to see John Hutchinson with “The Use of Model-Driven Development in Industry” in the morning, and Darius Silingas with “Why MDA Fails: Analysis of Unsuccessful Cases” in the afternoon.

In the evening it is again time for the punting boat tour. I already attended three times, but it will be great fun again for sure. Let’s hope the weather is not too bad. I saw a prediction of ~10°C and possibility of light shower. In the past we had luck, and on a warm, sunny day the tour is double fun. However, I’ll better put an umbrella into the suitcase.

On thursday I have again an active part in the hands-on session “Have Your Language Built While You Wait”, which is hosted by Risto Pohjonen from MetaCase. The idea of this session is that attendees can get a DSL with the language workbench of their choice built with the help of experts for this workbench. Of course I will assist on Xtext. If you had no chance to visit the Xtext workshop this might be your chance to get some hands on Xtext. This session was already run last year successfully. Last year my colleague Benjamin Schwertfeger took over the Xtext part, since we were at EclipseCon.

There are also some other talks around Xtext and Xtend. Both have been released in version 2.4 on March 20th, which brings some interesting new features. Most notably in regard to code generation are the Active Annotations. I guess this is also part of what Sven Efftinge will adress as future of code generation in his keynote “The Past, Present and Future of Code Generation” wednesday morning. More details he will present together with Sebastian Zarnekow in the tutorial “Internal DSLs with Xtend” (thursday 10:45-12:00). The last Xtext related talk will be from Moritz Eysholdt, called “Executable Specifications for Xtext Languages” (friday 10:45-12:15). I am actually not sure which of these talks I will attend personally. They are most relevant for my work, and I don’t work close enough with them to catch everything new in Xtext on my own. Thus, I’ll definetely would learn important aspects. On the other side, there are also other interesting talks in parallel.

The coming week will be an intensive experience with lots to learn and interesting persons to meet. Although I will really enjoy this time, I will be glad when I finally come back home. At the moment, my family is ill and I hope that I get not infected these days. I have been looking forward and worked for this event, so I am crossing fingers when I can board monday morning healthy.

I am sure the organizing team around Mark and Jacqui will do again a great job.

DSC00363

See you there and let’s make this event special!

Fornax Workflow Plugin 3.4.0 released

Finally I have managed to release a new version of the Fornax Maven Workflow Plugin again. This Maven plugin allows execution of MWE and MWE2 workflows from Maven, which is typically the case if you want to automate the build of Xtext or Xpand based projects with Maven.

The new version has some interesting new features which may be worth upgrading:

  • m2e lifecycle metadata
  • workflow dependencies can be configured as plugin dependencies
  • more options to detect changes that trigger the build
  • force/skip parameter to configure workflow execution overrides per configuration
  • log level detection when running in forked JVM

I have especially to thank Dieter Schulten from escalon, who has been willing to contribute to this release. He has mainly contributed the m2e configuration and some tests for the plugin.

Xtext Content Assist: Escape identifiers conflicting with keywords

I have faced in Spray the situation that a segment of a package name of a qualified Java type conflicts with a keyword of the Spray language. Specifically you can refer to custom features with the custom keyword, and the referred type was in a package containing also the name custom.

When inserting the proposed qualified name this results in an error due to the keyword collision.

The qualified name is usually combined through a sequence of ID rules, which allows escaping an identifier by prefixing it with the ^ character in the case of conflict with a keyword.

For content assist it would now be useful if the inserted string would be automatically escaped. So here is a way to solve this.

My first approach was to override the completeJvmParameterizedTypeReference_Type() method from the proposal provider and modify the proposals through a custom ICompletionProposalAcceptor. Sebastian Zarnekow commented that the proper way would be to register a IValueConverter for QualifiedName. I tried to do so, but was not successful. Actually there is already an QualifiedNameValueConverter registered.

My next solution is now to subclass JdtTypesProposalProvider and pass a custom IValueConverter. The overridden methods just pass null as converter, thus do no conversion. I am reusing the QualifiedNameValueConverter here, since it does the necessary keyword escaping.

public class SprayJdtTypesProposalProvider extends JdtTypesProposalProvider {
    @Inject
    private QualifiedNameValueConverter qnValueConverter;

    /**
     * Overridden to pass a default value converter
     */
    @Override
    public void createSubTypeProposals(JvmType superType, ICompletionProposalFactory proposalFactory, ContentAssistContext context, EReference typeReference, Filter filter, ICompletionProposalAcceptor acceptor) {
        createSubTypeProposals(superType, proposalFactory, context, typeReference, filter, getConverter(), acceptor);
    }

    /**
     * Overridden to pass a default value converter
     */
    @Override
    public void createTypeProposals(ICompletionProposalFactory proposalFactory, ContentAssistContext context, EReference typeReference, Filter filter, ICompletionProposalAcceptor acceptor) {
        createTypeProposals(proposalFactory, context, typeReference, filter, getConverter(), acceptor);
    }

    private AbstractValueConverter<String> getConverter() {
        return new AbstractValueConverter<String>() {
            /**
             * Remove ^ character from escaped segments
             */
            @Override
            public String toValue(String string, INode node) throws ValueConverterException {
                return string.replace("^", "");
            }

            /**
             * Escape segments colliding with keywords with ^ character
             */
            @Override
            public String toString(String value) throws ValueConverterException {
                // this converter will escape keywords with ^
                return qnValueConverter.toString(value);
            }
        };
    }
}

This custom implementation must be bound to the UI module:

public class SprayUiModule extends AbstractSprayUiModule {
    @Override
    public Class<? extends ITypesProposalProvider> bindITypesProposalProvider() {
        return SprayJdtTypesProposalProvider.class;
    }
}

Now the inserted qualified type name will be automatically replaced.