[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.gmf] Re: Linking from a node inside a compartment to a child node outside the compartment

Hello Steve,

a number of nodes. I want to define child nodes for these nodes
inside, but the child nodes should be outside the compartment some
where in the canvas to which I can make connections from the parent
to child. The problem is I don't know where to provide the child node
mapping in the gmfmap file.

If I define it as a child reference>node mapping under the respective nodes,

inside the compartment, it will be displayed inside the compartment in the final diagram. I want it to be outside..
Try to create "phantom" node mappings for these child nodes. This means:
- create a TopNodeReference with appropriate NodeMapping for each of child nodes
- leave âcontainmentFeatureâ property of these TopNodeReferences empty (this means corresponding top nodes will not be stored inside diagram domain element hierarchy on creation)
- create Link mappings using containment reference from child nodes container (located in a compartment) to these child nodes
As a result you will have the situation then you can create âphantomâ child nodes on diagram (corresponding domain model elements will be stored in a root of EMF resource) and then link these nodes with their parent element located inside a compartment using special link (in this moment corresponding domain model element will be moved below the actual parent, but visually will stay on the same place).


-----------------
Alex Shatalin