Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » phantom nodes
phantom nodes [message #236102] Mon, 13 July 2009 13:55 Go to next message
Gary is currently offline GaryFriend
Messages: 125
Registered: July 2009
Senior Member
Hi, I have previously used phantom nodes to get a containment relationship
to display as a normal link on the diagram canvas.
I was just wondering wether the new version of GMF had a better solution
for this issue or if this is still the best way to deal with such a
requirment?

Thanks in advance,
Gary
Re: phantom nodes [message #236476 is a reply to message #236102] Mon, 20 July 2009 11:50 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Gary,

Nothing as changed there.
BTW, what's wring with phantom nodes?

-----------------
Alex Shatalin
Re: phantom nodes [message #236873 is a reply to message #236476] Mon, 20 July 2009 13:34 Go to previous messageGo to next message
Gary is currently offline GaryFriend
Messages: 125
Registered: July 2009
Senior Member
Hi Alex,
Thanks for your reply!

In answer to your question:
It seams to me that phantom nodes ignore the underlaying model (ecore
model) and creates a relationship between the node and the canvas (even if
the node has no relationship to the canvas).
This is fine for visual representation of data, but causes the XML stored
by the diagram to be incorrect.
So if you are reusing the XML you are required to remove the relationship
between the phantom node and the canvas and add the correct containment
relationship.

This just seams a long (and wrong) way of sipmly displaying a containment
relationship as a link (rather than a node in a container).

I may be misunderstanding the way that phantom nodes work, if I am an
explination would be greatfuly appreciated, however the above seams to be
true in the last project I worked on!

Thanks,
Gary
Re: phantom nodes [message #236914 is a reply to message #236873] Mon, 20 July 2009 14:11 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Gary,

Phantom nodes without specified parent are stored in the root of domain model
resource now. This is probably what you can see and if you are using some
proprietary XML format for the domain model file phantoms without parent
element can break some constraints for this XML file.

As an option you can modify generated code to store phantom elements in a
diagram resource instead. This can probably help.

-----------------
Alex Shatalin
Re: phantom nodes [message #236937 is a reply to message #236914] Mon, 20 July 2009 14:22 Go to previous messageGo to next message
Gary is currently offline GaryFriend
Messages: 125
Registered: July 2009
Senior Member
Ok, I will take a look into that!
Thanks for the info Alex
Re: phantom nodes [message #236977 is a reply to message #236937] Mon, 20 July 2009 19:40 Go to previous messageGo to next message
RefuX Zanzeebarr is currently offline RefuX ZanzeebarrFriend
Messages: 51
Registered: July 2009
Member
Gary wrote:
> Ok, I will take a look into that!
> Thanks for the info Alex
>

Gary, I'd appreciate a follow up, once you figure out how to do that. It
seems a lot cleaner to store the phantom elements in the diagram resource.
Re: phantom nodes [message #237059 is a reply to message #236977] Tue, 21 July 2009 10:19 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello RefuX,

> It seems a lot cleaner to store the phantom elements in the diagram
> resource.
You can file bugzilla for it - we can introduce corresponding option into
..gmfgen model.

-----------------
Alex Shatalin
Re: phantom nodes [message #237143 is a reply to message #237059] Tue, 21 July 2009 14:40 Go to previous message
RefuX Zanzeebarr is currently offline RefuX ZanzeebarrFriend
Messages: 51
Registered: July 2009
Member
Alex Shatalin wrote:
> Hello RefuX,
>
>> It seems a lot cleaner to store the phantom elements in the diagram
>> resource.
> You can file bugzilla for it - we can introduce corresponding option
> into .gmfgen model.
>
> -----------------
> Alex Shatalin
>
>
>

Done: https://bugs.eclipse.org/bugs/show_bug.cgi?id=284135
Previous Topic:Auto Arranging
Next Topic:Color transition on canvas
Goto Forum:
  


Current Time: Fri Mar 05 14:35:29 GMT 2021

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

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

Back to the top