xtext with external references

I have just seen, that by now xText supports external references out of the box. This is a long awaited and really useful feature. Thanks a lot.

MDSD in 5 minutes

Step 1 (real live): You have the wish to get a cup of tea of “Pai Mu Tan”.

Step 2 (model): You are creating a wish-model containing an element of type “Cup” which has an attribute named “content” of type string and the value “Pai Mu Tan”. The model is the digital representation of a real-life-wish.

Step 3 (metamodel): You want to create other wishes too and you are designing a metamodel. The wish-metamodel contains a the root element “Wishes” containing a many-containment reference “wishes” to the type “Wish”. The abstract type “Wish” is derived by the types “Cup”, “Book”, “FreshAir” and “OtherWish”. “Cup” has an attribute “content” while “Book” has an attribute “title” of type String. “FreshAir” does not need an attribute and “OtherWish” has no meaningful attributes. Using the wish-metamodel you could express a lot of wishes.

Step 4 (editor): You want others to express their wishes. Let’s create an editor, they could use to do that. Using Eclipse and your metamodel it is really simple to create an EMF based tree editor. You are happy.

Step 5 (great models): Your models grow (you have extended your metamodel with other wish-types) and you want to group your wishes by occasion (Birthday, Christmas, other) if they are of long-term, short-term or just-now. You are doing that by extending the metamodel with other types (AbstractOccasion, Birthday, Christmas, AbstractWhen, LongTerm, ShortTerm, JustNow) and some connection types connecting your wish with when they should be active. it is hard to keep the overview about all your wishes – you want a better editor (which is a wish-type of it’s own).

Step 6 (graphical editor): You have chosen GMF as your editor framework. It is great – you could express all you want – your wishes, the occasions and whether your wishes are more short- or long-term in a model driven way and without writing one single line of java-code. Now you have the overview about all the wishes.

Step 7 (more wish-types): Every time you create a new wish-type in your metamodel you have to copy-and-paste-and-change some parts of the GMF-models to express the editor object for your new type. You want more abstraction like a templating engine for GMF-models.

I am currently developing such a model-templating engine called GenGMF. You could create a template-tree for the GMF-Graph and for the GMF-Map models having place-holders for the type-names you want to instantiate (e.g. “__TYPENAME__NodeFigure”) and some modelled instructions how to instantiate the tree in the GMF-models. It is even possible to change the instantiated trees on-the-fly. For example – I reengineered the sample editor from one of my last posts. The rectangle and the elliptic nodes are instantiated from the same template (which only knows rectangles). A XTend-based creation Filter changes the Rectangle to Ellipse – the rest of the tree is the same. Post processing (also via XTend) is also available to insert more stuff into the generated models.

work in progress…

10% done.
20% done.
30% done.
40% done.
50% done.
60% done.
70% done.
80% done.
90% done.
100% done.
110% done.
120% done.
130% done.

Diving

I am currently diving into the secrets of GMF - and it's cool

communication vs. reality

I don’t have a working telephone since last Sunday.

I’ve called my telephone provider to make it work on Tuesday. They answered that they created a service ticket and will call me back later.

Nothing happened.

I’ve called again on Wednesday. They wanted to call me at least the next day.

Nothing happened.

I’ve called again on Friday morning. They wanted to call me back.

Nothing happened.

I’ve called again on Friday evening. (As a remember – I am waiting since Tuesday for a call). They wanted to call me back. While answering I may have spoken a bit to tartly, but…

I’ve got a call within two minutes.

In this call I’ve heard, that there is no ticket, so they made one (guaranteed). It is unlikely that I will be called back before the weekend, but…

About one week later I’ve got a call on my mobile phone. Everything did worked except that the calls didn’t come through. There was a bug in a dumb telephony socket (not really – but it just did not work)…

telephony socket

talks in the store

I have seen – there are a lot of interesting talks in the newthinking store in Berlin Mitte

  • Erste Schritte mit LaTeX (2008-01-29, 2008-02-05)
  • IT im Auswärtigen Amt (2008-01-30)

and in the Kalkscheune

  • Richard Stallman (2008-02-18)

See you there.

MetamodelDoc

I have got the time to set up the entry site for my currently most active project MetamodelDoc. It is an Eclipse Plug-In for generating a documentation of a metamodel. At present this has to be an Ecore metamodel. As a sample I’ve generated a documentation of the Ecore metamodel (which is expressed in it self). If you want to give it a try just install the plugins via the Update Site. The generation is triggered from the context menu of an .ecore-file.

Do you see the difference?

Do you see the difference between the following two pictures?

Pict 1 Pict 2

It was the result of the CatChaser pinning two balloons and part of one of the eight talks held at the Eclipse DemoCamp in Hamburg. A lot of interesting projects and concepts where presented. They made a video of the talks which will be available soon.

One of the intended presenters wasn’t available. They asked me to talk – as substitute – about MetamodelDoc. As I had prepared my slides for the DemoCamp in Berlin already – I agreed. The slides are – of course – available.

Update

After the event in Hamburg the event in Berlin was a success too. There are a lot of interesting projects. One of them – ObjectTeams – I will give a try. It could be described as sophisticated and object oriented AspectJ with dynamic binding (well – ehm …, the language constructs are not the same) and it integrates very nicely into the JDT environment (by replacing the JDT-core plugin :-/). An interesting feature is – you could de-/activate an aspect (it is called Team here) during the lifetime of an object and on a per object basis.

xrandr-iced

Cloning is so easy if you know what to do.
# xrandr -q
returns with a list of screens, the connected outputs and available modes. For me LVDS is the internal LCD display and VGA-0 the external output. Using this information
# xrandr --output VGA-0 --same-as LVDS
# xrandr --output VGA-0 --auto

is all I have to do to enable my secondary monitor output within linux. All the xorg.conf editing stuff is useless – xrandr just worked.

I wanted to enable xinerama but my XServer crashed when enabled…

camping in the shade of the solar eclipse

As you may have noticed – there was no Eclipse DemoCamp campsite available in the eastern part of Germany. After some discussion – there will be a “newthinking store”-campsite in Berlin on the 19th December starting at about 18:00.

I am currently writing an oAW-based documentation generator for Metamodels called “metamodeldoc“. Currently only Ecore based Metamodels are supported but UML is planned too. As an example I’ve generated a documentation for the Ecore Meta(meta)model which is also a model instance of it self and placed it at http://metamodeldoc.randomice.net/ecore/

At the Democamp I want to talk about some internals of metamodeldoc.
If you are interested in Metaprogramming and all the other cool stuff… just append your name to the
end of the list of Attendees (or even Presenters) at http://wiki.eclipse.org/Berlin_DemoCamp.

You will need an https://bugs.eclipse.org/bugs/-Account to add your self to the list. Don’t want to register? (it doesn’t hurt!) Just leave a comment and I will add you to the list.

You can opt-out from Google Analytics tracking by clicking the link below. Click here to opt-out.