jeudi 26 février 2009

A simple ATL/Prefuse Use Case

I recently discovered prefuse (better late than never) and the various examples made me imagine an ATL use case: creating several points of view from a given UML2 model. Let's see what it consists on, using for example a model standing for the ATL Virtual Machine structure.

So, a pop-up dynamically launch a set of ATL transformation on a model:

The Tree View shows a containment tree of classes and packages:

The Graph View shows an association sub-net (with a lot of parameters... useless in our case but quite fun):

Those views are quite simplistic - I didn't change original prefuse demos - but could be extended to display more data from the input model.

This example, and other advanced model transformation techniques will be explained in the EclipseCon 2009 ATL tutorial.

8 commentaires:

  1. Sometimes never is better. For example non-SWT UI does not look good in Eclipse, so you may want to discover Zest.

  2. I agree, and Zest seems to be as powerful as its API is simple to use. But that's the point: this demo is focused on the ATL transformation between UML and GraphML/TreeML, so I don't want to write Java code (excepted to launch ATL transformations).

    Prefuse directly brings views from xml graph files, so it fitted my current need. I understand that you're bored to see people like me using prefuse in an "Eclipse context" ;-) , but be sure that if I find a way to - simply - load GraphML (EMF model/xmlfile) into Zest, I would rewrite my ATL demo...

  3. Eugene, thanks for shout-out about Zest.

    William, we can hack this at EclipseCon. I used ATL for model transformations for a number of targets (birt, Zest, JFace, etc...) during my PhD. I have some EMF models for all these things.

  4. Ok, I will be pleased to see that !

  5. The images are broken in this post :-(

  6. Images are back... thanks for reporting it !

  7. Can I display UML diagrams that look like UML diagrams using Perfuse?

  8. For the purpose of this example I used the simpliest features of prefuse, but maybe the diagrams could be enhanced a bit. I don't think you can reach an "UML-like" look anyway.

    The goal here was more to make an very specific point of view of a given concept : containment, inheritance...
    This was done 3 years ago, maybe prefuse has evolved since, or there is a better API somewhere :-)