[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [henshin-dev] Interpreter Wizard
|
I committed a patch that fixes this issue. It seems to work, but there
is still a problem related to the registering of packages in the wizard.
Cheers,
Christian
On 10/30/2012 06:52 PM, Christian Krause wrote:
Hi,
I debugged the problem a bit more. The problem with the Sierpinski
example is actually caused by the missing handling of root objects by
the interpreter wizard. What we need to do in the interpreter wizard
is to use a Resource as model root, and not just a single EObject.
After the transformation we need to collect newly created root objects
from EGraph and put them back into the resource. Than we can make the
diff on the two resources (or apply the transformation and save the
new resource).
The Sierpinski example is a bit special: to improve the performance,
the transformation only considers Vertex objects, and not
VertexContainers. In the interpreter wizard you might expect that the
new vertices are added to the container, but this is not done by the
rule for performance reasons.
Cheers,
Christian
On 10/19/2012 08:48 PM, Christian Krause wrote:
Dear Gregor,
could you at some point revise the interpreter wizard? We currently
have 2 problems:
1) The Sierpinski example seems not to work in the wizard (but in the
stand-alone Java app).
2) The wizard does not support models with multiple root objects. As
an example you can take the Ecore2UML example. It should generate two
UML packages ("ecore" and "flowchartdsl") which should be added as
new root objects. Actually, all generated trace objects should also
become root objects. If the model is too big, you can also try a
smaller example.
In general, I recommend to construct an EGraph like this: new
EGraphImpl(resource) or EGraph(eobject). Note that there are 2 new
methods called addGraph(EObject) and removeGraph(EObject). In
contrast to addTree(EObject), the new methods will add / remove all
transitively reachable objects to the graph, and not just the
children in the containment tree. When you transformed the graph, use
getRoots() to obtain the root objects again.
Cheers,
Christian