Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » X icon on link
X icon on link [message #108285] Thu, 01 March 2007 14:19 Go to next message
Eclipse UserFriend
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 #108353 is a reply to message #108285] Fri, 02 March 2007 02:37 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: kalin.nakov.gmail.com

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 #108465 is a reply to message #108353] Fri, 02 March 2007 08:30 Go to previous messageGo to next message
Eclipse UserFriend
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 #108556 is a reply to message #108465] Fri, 02 March 2007 09:54 Go to previous messageGo to next message
Eclipse UserFriend
> to avoid issues like these, i suggest using UUID's on your domain model
> (like the diagram notation).

Great, thanks ! That was a missing piece in a puzzle anyway ...

> or you can change your domain model itself, to always use UUID's

For now, I've manually added a 2nd extension_parser with
<?gmfgen generated="false"?>
to the plugin.xml which works perfectly.

But when you say "change the domain model", how would this be
done/modeled to be then generated ?

Thanks !


Armin
Re: X icon on link [message #108569 is a reply to message #108556] Fri, 02 March 2007 10:31 Go to previous messageGo to next message
Eclipse UserFriend
Armin Mueller wrote:
>> to avoid issues like these, i suggest using UUID's on your domain
>> model (like the diagram notation).
>
> Great, thanks ! That was a missing piece in a puzzle anyway ...
>
>> or you can change your domain model itself, to always use UUID's
>
> For now, I've manually added a 2nd extension_parser with
> <?gmfgen generated="false"?>
> to the plugin.xml which works perfectly.
>
> But when you say "change the domain model", how would this be
> done/modeled to be then generated ?

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




>
> Thanks !
>
>
> Armin
Re: X icon on link [message #108582 is a reply to message #108569] Fri, 02 March 2007 10:41 Go to previous message
Eclipse UserFriend
> 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.
Previous Topic:Problem creating links programatically using CreateRelationshipRequest
Next Topic:how to force CanonicalEditPolicy to remove all views/editparts
Goto Forum:
  


Current Time: Mon Jul 21 21:19:45 EDT 2025

Powered by FUDForum. Page generated in 0.04144 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top