Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Overlap Compartment Figure
Overlap Compartment Figure [message #176776] Wed, 12 March 2008 10:22 Go to next message
Eclipse UserFriend
Originally posted by: taggartboy.hotmail.com

Hi,

does anyone know how i can make a node appear outside the bounds of it's
parent compartment but still be contained within the compartment?
Re: Overlap Compartment Figure [message #176784 is a reply to message #176776] Wed, 12 March 2008 10:45 Go to previous messageGo to next message
Enrico Schnepel is currently offline Enrico SchnepelFriend
Messages: 121
Registered: July 2009
Senior Member
Hello,

you have to remove the compartment and compartment mapping but leave the
child reference.

Enrico

Peter Taggart wrote:

> Hi,
>
> does anyone know how i can make a node appear outside the bounds of it's
> parent compartment but still be contained within the compartment?
Re: Overlap Compartment Figure [message #177021 is a reply to message #176784] Thu, 13 March 2008 09:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: taggartboy.hotmail.com

Thanks for your reply,


I tried this but it still seems to place the shape inside the parents
bounds which grow to contain the node.

What am I really trying to achieve is this:


| |
| Node A | Node B
| |
| |


Node A is in a compartment of it's parent and Node B is a child of Node A
but needs to be shown outside of Node A's parent. If i could find some
way of overlapping part of the Node A shape outside it's parent this would
be ideal, but I am stuck because when my layout manager places Node A in
it's parent compartment, the bounds of the parent increase.

Any ideas on this would be a great help,

Thanks
Peter.
Re: Overlap Compartment Figure [message #177045 is a reply to message #177021] Thu, 13 March 2008 09:33 Go to previous messageGo to next message
Enrico Schnepel is currently offline Enrico SchnepelFriend
Messages: 121
Registered: July 2009
Senior Member
gmf cannot use parent.childA.childB as feature in the child reference. but
if you provide a derived reference feature in the parent emf node type
which collects all b's in the a's you might be able display them outside of
the parent node. I havn't tried this - it's just a suggestion.

something like this ...
http://www.eclipse.org/modeling/emf/docs/overviews/FeatureMa p.pdf
.... with child nodes.

regards

Enrico

Peter Taggart wrote:

> Thanks for your reply,
>
>
> I tried this but it still seems to place the shape inside the parents
> bounds which grow to contain the node.
>
> What am I really trying to achieve is this:
>
>
> | |
> | Node A | Node B
> | |
> | |
>
>
> Node A is in a compartment of it's parent and Node B is a child of Node A
> but needs to be shown outside of Node A's parent. If i could find some
> way of overlapping part of the Node A shape outside it's parent this would
> be ideal, but I am stuck because when my layout manager places Node A in
> it's parent compartment, the bounds of the parent increase.
>
> Any ideas on this would be a great help,
>
> Thanks
> Peter.
Re: Overlap Compartment Figure [message #177214 is a reply to message #177021] Thu, 13 March 2008 19:03 Go to previous message
Cherie Revells is currently offline Cherie RevellsFriend
Messages: 299
Registered: July 2009
Senior Member
Peter,

From the GEF point of view, it is very tricky to have a child figure
drawn outside the bounds of its parent figure. In fact, GEF doesn't
really allow this. Is your Node B figure a child of the Node A figure?

It is easy to draw Node B anywhere if you place it on another layer and
use a locator to set the bounds of the figure instead of the layout
manager of the compartment. Decorations work in this way.

In GMF, we do allow border items to be drawn outside their container
figures if you wanted to look into how this is done, but I will warn you
that it isn't the prettiest solution.

Regards,
Cherie

Peter Taggart wrote:
> Thanks for your reply,
>
> I tried this but it still seems to place the shape inside the parents
> bounds which grow to contain the node.
>
> What am I really trying to achieve is this:
>
> | |
> | Node A | Node B
> | | | |
>
>
> Node A is in a compartment of it's parent and Node B is a child of Node
> A but needs to be shown outside of Node A's parent. If i could find
> some way of overlapping part of the Node A shape outside it's parent
> this would be ideal, but I am stuck because when my layout manager
> places Node A in it's parent compartment, the bounds of the parent
> increase.
>
> Any ideas on this would be a great help,
> Thanks
> Peter.
>
Previous Topic:uml2 casetool
Next Topic:stop view creation when modelElement is null
Goto Forum:
  


Current Time: Thu Sep 26 02:33:22 GMT 2024

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

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

Back to the top