Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » problems with phantom elements
problems with phantom elements [message #156802] Tue, 23 October 2007 15:05 Go to next message
Eclipse UserFriend
Originally posted by: orlando.opencanarias.com

Hello All,

I'm using phantom nodes in my GMF editor but there seems to
be a problem with it. I'll try to explain it with an
example:

I've got a metaclass A with a containment reference to B.
B is a phantom element so I want its instances to be shown
at the same level as A's; connected with them through a
link.

A third metaclass M corresponds to the diagram element; in
the metamodel, M is connected to A with a containment
reference.

Well, I generate a GMF editor and all seems to be ok:

When I generate a diagram from a model with more
than one instance of M, the editor naturally asks
for the 'm' to become diagram element.

The diagram will show properly all A instances ('as')
children of 'm' as well as all B instances ('bs')
children of those a.

The problem is that also 'bs' descending from
other 'm' elements of the model (that have nothing to do
with the actual diagram) are shown!!!

These misplaced 'bs' appear isolated and not connected
to any 'a' within the actual diagram; this makes sense
as their parent 'a' are not shown within the diagram.

I would appreciate any tip about this bizarre behavior


Bests,

Orlando.
Re: problems with phantom elements [message #156810 is a reply to message #156802] Tue, 23 October 2007 15:37 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Orlando Avila-Garcia,

You can modify generated ???DiagramUpdater.getPhantomNodesIterator() method
to filter out incorrect 'bs'.

-----------------
Alex Shatalin
Re: problems with phantom elements [message #156849 is a reply to message #156810] Tue, 23 October 2007 17:57 Go to previous message
Eclipse UserFriend
Originally posted by: orlando.opencanarias.com

Done! Many thanks Alex...

Orlando.



On Tue, 23 Oct 2007 15:37:26 +0000, Alex Shatalin wrote:

> Hello Orlando Avila-Garcia,
>
> You can modify generated ???DiagramUpdater.getPhantomNodesIterator() method
> to filter out incorrect 'bs'.
>
> -----------------
> Alex Shatalin
Previous Topic:Versioning of diagram file
Next Topic:Strange "Access restriction" error creating diagram editor code
Goto Forum:
  


Current Time: Wed Jul 03 10:30:42 GMT 2024

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

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

Back to the top