Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Root nodes not contained in Canvas object
Root nodes not contained in Canvas object [message #184084] Wed, 23 April 2008 18:11 Go to next message
Eclipse UserFriend
Originally posted by: user.example.net

Hi,

It looks to me like root node objects have to be contained (containment
feature) in the canvas object.

Would it be possible to have the root nodes NOT contained in the canvas
object, but just references to somewhere else? I would like to have both
a create tool, that creates a new node, and a pick tool that picks an
already existing root object to be included in the diagram. To what
extent could I model this?

Something like this:


AllTopics ->(container) Topic

Diagram -> (refers to) Topic

I'd have two tools that add Topics to the diagram, a Create tool and a
Pick from all Topics tool.

Thank you,

Calin
Re: Root nodes not contained in Canvas object [message #184105 is a reply to message #184084] Thu, 24 April 2008 07:51 Go to previous message
Richard Gronback is currently offline Richard GronbackFriend
Messages: 605
Registered: July 2009
Senior Member
I'm not sure I completely follow what you'd like to do, but it is possible
to have nodes on the canvas that are not contained by the canvas domain
element. We call these "phantom nodes" (do a search on this newsgroup and
wiki for more details), which are later contained in their proper element
using a connection link. In this case, the target feature of a link mapping
determines the containment reference the interim-phantom element belongs.

Best,
Rich


On 4/23/08 8:11 PM, in article funu48$30o$1@build.eclipse.org, "Calin
Medianu" <user@example.net> wrote:

> Hi,
>
> It looks to me like root node objects have to be contained (containment
> feature) in the canvas object.
>
> Would it be possible to have the root nodes NOT contained in the canvas
> object, but just references to somewhere else? I would like to have both
> a create tool, that creates a new node, and a pick tool that picks an
> already existing root object to be included in the diagram. To what
> extent could I model this?
>
> Something like this:
>
>
> AllTopics ->(container) Topic
>
> Diagram -> (refers to) Topic
>
> I'd have two tools that add Topics to the diagram, a Create tool and a
> Pick from all Topics tool.
>
> Thank you,
>
> Calin
Previous Topic:replacing editparts..
Next Topic:pre-filled containment
Goto Forum:
  


Current Time: Thu Apr 18 11:03:54 GMT 2024

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

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

Back to the top