X icon on link [message #108285] |
Thu, 01 March 2007 14:19  |
Eclipse User |
|
|
|
Hi,
what does an X in a circle indicate on a link ? I get this (together
with a label set to "true") on some links when editing other, seemingly
unrelated parts of a model. In parallel, the labels of other links shift
around (from one link to another).
Thanks,
Armin
|
|
|
|
Re: X icon on link [message #108465 is a reply to message #108353] |
Fri, 02 March 2007 08:30   |
Eclipse User |
|
|
|
If your model does not use ID's this will happen, since EMF will try to
come up with an ID for you element it will use the index of the element
within its containment feature
to avoid issues like these, i suggest using UUID's on your domain model
(like the diagram notation).
If you use GMFResourceFactory to create your resource will get that for free
if you check your generated diagram plugin.xml you will see how this is
being done for the diagram resource, it should be something like that
<extension point="org.eclipse.emf.ecore.extension_parser">
<?gmfgen generated="true"?>
<parser
type="????_diagram"
class=" org.eclipse.gmf.runtime.emf.core.resources.GMFResourceFactor y ">
</parser>
</extension>
or you can change your domain model itself, to always use UUID's
Another side effect for not using ID's is that copy and paste (on the
diagram surface) will copy the diagram element but it will have troubles
copying your semantic element.
i Hope this helps
Kalin Nakov wrote:
> Hi,
>
> I will clarify the situation in more detail. Imagine you have a model
> with 5 links. You draw a diagram with 4 links (1 of the link from the
> model is not referenced). Then you go to the tree editor and delete
> exactly that link that is not visible in the diagram. The result is that
> the links in the diagram are shifted and the last of them has a (X) sign
> on it (seems that the domain element has disappeared).
>
> According to me the links in the diagram keep the domain elements as
> indexes in a list rather than pointers to real instances. When I delete
> an element in that list the order gets spoiled thus the indexes are no
> longer valid, the links are shifted upwards and the last link in the
> list gets a (X) sign.
>
> How can we solve that problem?
>
> Thanks,
> Kalin
>
> Armin Mueller wrote:
>> Hi,
>>
>>
>> what does an X in a circle indicate on a link ? I get this (together
>> with a label set to "true") on some links when editing other,
>> seemingly unrelated parts of a model. In parallel, the labels of other
>> links shift around (from one link to another).
>>
>>
>> Thanks,
>> Armin
|
|
|
|
|
Re: X icon on link [message #108582 is a reply to message #108569] |
Fri, 02 March 2007 10:41  |
Eclipse User |
|
|
|
> what i was trying to way is that you can have this
>
> <extension
> point="org.eclipse.emf.ecore.extension_parser">
> <parser
> class="SomePAckage.MyResourceFactory"
> type="MyModelExtension">
> </parser>
> </extension>
>
> In your model plugin instead of the diagram, this way even if you open
> your resource using EMF API's from any other plugin it should have the
> correct resource implementation
Ok, then I misunderstood, I thought this could be a property of the gmf
domain model. I had already added the above and it works.
|
|
|
Powered by
FUDForum. Page generated in 0.04687 seconds