Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Parent and Child Nodes on GMF diagram
Parent and Child Nodes on GMF diagram [message #171748] Thu, 07 February 2008 08:03 Go to next message
Eclipse UserFriend
Hi All,
I have one parent node and others child nodes on pallet.I can place parent
node on diagram and also can place child nodes on parent node. parent and
children have custom figures(SVG format).

I want to place the parent node within the parent node(parent node as a
child of parent) and each parent node will contain its children. and also
children could be place directly to the diagram.
I tried to add Child Reference(Top Node Refence as its child) in in
GMFgraph but I receive the following error while generating gmfgen

Containment Feature must be owned by Domain Meta Element or its supper
type of this reference parent Node Mapping

I am not sure that this approach will work or not.

Please guide me how can I do it.

Thanks in advance.
Re: Parent and Child Nodes on GMF diagram [message #171756 is a reply to message #171748] Thu, 07 February 2008 08:22 Go to previous messageGo to next message
Eclipse UserFriend
Hi All,

Sorry there is a mistake in my question.

The parent has rectangle shape not custom figure.

Thanks
Re: Parent and Child Nodes on GMF diagram [message #171881 is a reply to message #171748] Fri, 08 February 2008 07:51 Go to previous messageGo to next message
Eclipse UserFriend
Hello Noor,
Please find pointers below that may help you.
1. Make sure that the container/parent(Rectangle) in the model holds a
containment relation with itself and also with child elements(say
circle).
2. In the .gmfmap model, you need to add a child references to rectangle
and
also to the circle, and add node mappings respectively.
3. In the .gmfgen model, for the rectangle(parent) node, change the child
node
property and add rectangle(parent) and circle(child)as child nodes.

Well, with the above steps you will be able have nested parent and also
add child elements. The problem here is you wont be able to move child
nodes dropped in the 'nested_parent', though the List layout property of
the compartment is set. May be some one may like to point out the changes
that need to be done to enable the movement of child elements in the
nested_parent.

Hope this helps.


Noor wrote:

> Hi All,
> I have one parent node and others child nodes on pallet.I can place parent
> node on diagram and also can place child nodes on parent node. parent and
> children have custom figures(SVG format).

> I want to place the parent node within the parent node(parent node as a
> child of parent) and each parent node will contain its children. and also
> children could be place directly to the diagram.
> I tried to add Child Reference(Top Node Refence as its child) in in
> GMFgraph but I receive the following error while generating gmfgen

> Containment Feature must be owned by Domain Meta Element or its supper
> type of this reference parent Node Mapping

> I am not sure that this approach will work or not.

> Please guide me how can I do it.

> Thanks in advance.
Re: Parent and Child Nodes on GMF diagram [message #171971 is a reply to message #171881] Sat, 09 February 2008 13:20 Go to previous message
Eclipse UserFriend
Thanks Neeraj,
it works. dropped children are also moving. I used XY Layout.
Previous Topic:deploy editor outside
Next Topic:Prevent link deleting
Goto Forum:
  


Current Time: Tue May 13 23:34:43 EDT 2025

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

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

Back to the top