Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Phantom nodes in gmfmap rendering all elements in the model
Phantom nodes in gmfmap rendering all elements in the model [message #237007] Tue, 21 July 2009 06:12
Jevon  is currently offline Jevon Friend
Messages: 164
Registered: July 2009
Senior Member
Hi,

I had a diagram editor which could render diagram nodes, but not permit
them to be created. This was so I could create shortcut elements in the
editor. To achieve this, I had created a nonsense ecore containment
feature as their direct Containment Feature, but simply disabled the
Creation Tool in the gmfmap.

I want to remove the nonsense ecore element to clean up the ecore model;
however, if I set the Containment Feature to null, the creation tool
becomes a phantom node.

If the diagram contains a phantom node,
XXXDiagramUpdater.getXXXSemanticChildren() also uses
getPhantomNodesIterator(Resource), which by default returns the contents
of the entire model (Resource.getAllContents()).

As a result, the initialised diagram editor renders _all_ phantom nodes
from all over the document within the editor, as opposed to not
rendering anything (as it was doing before).

I can easily use Dynamic Templates to replace
XXXDiagramUpdater.getPhantomNodesIterator(Resource) with "return
Collections.EMPTY_LIST.iterator();" (and this is my current approach and
it works fine), but I was curious if there would be a better way to
define nodes in the gmfmap which don't have a creation tool, are not
directly contained, and do not automatically render and initialise _all_
elements in the local model.

Any thoughts?

Thanks!
Jevon
Previous Topic:Replacing tool palette navigation with a scrollbar
Next Topic:Removing a diagram from the New wizard
Goto Forum:
  


Current Time: Wed Apr 24 18:46:11 GMT 2024

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

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

Back to the top