Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Node Container(adding nodes to containing figure (no compartments!))
Node Container [message #707982] Tue, 02 August 2011 09:54 Go to next message
newbie_on_gmf is currently offline newbie_on_gmfFriend
Messages: 11
Registered: June 2011
Junior Member
Hey all,

is there a possible solution to add nodes in a figure (e.g. in a rectangle)?

Or in other words: Can I create Nodes without underlying domain Elements in which other nodes can be added like compartments?

Problem: The containing figure is NOT a representation for a domain element.


I'll be thankful for any help...

regards

[Updated on: Tue, 02 August 2011 20:19]

Report message to a moderator

Re: Node Container [message #709230 is a reply to message #707982] Wed, 03 August 2011 17:02 Go to previous messageGo to next message
newbie_on_gmf is currently offline newbie_on_gmfFriend
Messages: 11
Registered: June 2011
Junior Member
Is there really no solution to this problem?
Can't believe it's that difficult.

I'm not very skilled in GUI programming but maybe there is a way to add a content pane and add the nodes into it. But I really didn't know how exactly.

Or can this problem being solved directly in the mapping model? That would be the nicer approach, because I need a creation tool for the container.

If someone have a (hopefully simple) solution, please post...

Thanks in advance
Re: Node Container [message #709234 is a reply to message #709230] Wed, 03 August 2011 17:06 Go to previous messageGo to next message
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 865
Registered: July 2009
Location: Grenoble, France
Senior Member

IMHO, your rectangle IS a domain element, it is not only a decoration.
You should think about refactoring your domain model. Containment is a
structural relationship, it is difficult to render in GMF if it is not
part of your domain.

HTH

--
http://mickaelistria.wordpress.com
http://twitter.com/#!/mickaelistria
http://www.petalslink.com
Re: Node Container [message #709275 is a reply to message #709234] Wed, 03 August 2011 18:16 Go to previous messageGo to next message
newbie_on_gmf is currently offline newbie_on_gmfFriend
Messages: 11
Registered: June 2011
Junior Member
Hello Mickael,

thanks a lot for your reply.

Your suggested solution would solve the problem.
Unfortunately I want to use the solution as well for other elements.
So if I'd do it that way the complexity of the underlying domain model will rise up unnecessarily.


Maybe it makes my point a way clearer if i post the actual structure of the affected elements:

Consider the elements A and B.
There is a multiple containment-relation between A and B thus A hold several B's.

To apply your solution I have to add an element C (container) which serves as the container. So I got the following structure:

A contains one C & C contains multiple B's.

This produces a lot of overhead which did not actual reflect the underlying (and desired) domain-structure.


At the end I have to do it that way but im still hoping that there exist another approach which fits the underlying structure. I really need it for decorative purposes only.

[Updated on: Wed, 03 August 2011 18:18]

Report message to a moderator

Re: Node Container [message #709732 is a reply to message #709275] Thu, 04 August 2011 08:34 Go to previous messageGo to next message
Valerian Merkling is currently offline Valerian MerklingFriend
Messages: 71
Registered: May 2011
Member
I'm not sure i understood everythings but in your case, A contains some B, so in your gmfgraph, this is what you're supposed to have :
a FigureA
a NodeA which the figure attribute is set to FigureA
a CompartmentForBs which the figure attribute is also set to FigureA
and a Figure for B and it's node.

In that case, the same graphical element will be used to represend A and hold Bs, and there is no need for a C class
Re: Node Container [message #710279 is a reply to message #709732] Thu, 04 August 2011 21:53 Go to previous message
newbie_on_gmf is currently offline newbie_on_gmfFriend
Messages: 11
Registered: June 2011
Junior Member
Thanks for replying.

There is no need to build a graphical representation for element A.
I have a subdiagram which represents A.
In this subdiagram I only want to have Nodes of element B which should be drawn in an aligned manner...

To repeat the issue: The graphical container is not a domain element.

[Updated on: Thu, 04 August 2011 21:55]

Report message to a moderator

Previous Topic:Variables View
Next Topic:How to add a text panel to my diagram editor ?
Goto Forum:
  


Current Time: Thu Mar 28 18:29:19 GMT 2024

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

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

Back to the top