but for some reason, the resulting editor does not create the model as expected.
the problem is, when i add a contained node and connect it to a containing node (in one step, without saving in between), the node is not really added as a containment but is put directly in the resource (and only a link is created).

DataPool is the diagram root, PrimitiveType in this case is the containing node, and PartitionValue the contained node.
as you can see, instead of putting the partition value as a containment, it is created outside the diagram root and only linked.
of course, the way it is now, the tree editor shows both partition values.
has anyone an idea why it is working this way?

thanks in advance

marco]]>m kranz2010-02-08T15:27:41-00:00Re: problem with creation of phantom nodeshttps://www.eclipse.org/forums/index.php/mv/msg/184645/585922/#msg_585922
Could you possibly send me your annotated metamodel (dskolovos - gmail -
com) so that I can have a look at this?

Cheers,
Dimitris

Marco.Kranz@fokus.fraunhofer.de wrote:
> hi
>
> i tried to use phantom nodes as shown in the eugenia example.
>
> http://www.eclipse.org/gmt/epsilon/doc/articles/eugenia-phan tom-nodes/
>
> but for some reason, the resulting editor does not create the model as
> expected.
> the problem is, when i add a contained node and connect it to a
> containing node (in one step, without saving in between), the node is
> not really added as a containment but is put directly in the resource
> (and only a link is created).
>
> for example, it looks like this:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:testing="http://www.fokus.fraunhofer.de/testing/testing.ecore">
> <testing:DataPool xmi:id="_S_9dIBS_Ed-tb5U5tmCMAw">
> <ownedPartition xsi:type="testing:PrimitiveType"
> xmi:id="_UUkfoBS_Ed-tb5U5tmCMAw">
> <value href="#_637wYBTCEd-Ag7GywjYsiQ"/>
> </ownedPartition>
> </testing:DataPool>
> <testing:PartitionValue xmi:id="_637wYBTCEd-Ag7GywjYsiQ"/>
> </xmi:XMI>
>
> but it should look like this:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:testing="http://www.fokus.fraunhofer.de/testing/testing.ecore">
> <testing:DataPool xmi:id="_S_9dIBS_Ed-tb5U5tmCMAw">
> <ownedPartition xsi:type="testing:PrimitiveType"
> xmi:id="_UUkfoBS_Ed-tb5U5tmCMAw">
> <value xmi:id="_637wYBTCEd-Ag7GywjYsiQ"/>
> </ownedPartition>
> </testing:DataPool>
> </xmi:XMI>
>
> DataPool is the diagram root, PrimitiveType in this case is the
> containing node, and PartitionValue the contained node.
> as you can see, instead of putting the partition value as a containment,
> it is created outside the diagram root and only linked.
> of course, the way it is now, the tree editor shows both partition values.
> has anyone an idea why it is working this way?
>
> thanks in advance
>
> marco