problem with creation of phantom nodes [message #585908] |
Mon, 08 February 2010 15:27 |
m kranz Messages: 69 Registered: January 2010 |
Member |
|
|
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
|
|
|
Re: problem with creation of phantom nodes [message #585922 is a reply to message #585908] |
Mon, 08 February 2010 15:43 |
Dimitrios Kolovos Messages: 1776 Registered: July 2009 |
Senior Member |
|
|
Hi Marco,
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
--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
|
|
|
Powered by
FUDForum. Page generated in 0.02111 seconds