Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Deep containment
Deep containment [message #163582] Sat, 01 December 2007 15:37 Go to next message
Eclipse UserFriend
Originally posted by: steve.orobec.bt.com

Hi

I have a metamodel that contains some deep containments (6 or 7 layers).


I am familiar with using phantom nodes and most of my nodes are managed
that way
so that the child nodes are visualised outside the parent.

However, for some special cases I would really like the visual to match
the meta-
model, eg in metamodel A contains B and B contains C which could contain D.

Is it possible somehow to create this visually such that A is a node, B is
an internal rectangle with a border (perhaps floating inside A since A
uses X-Y layout). Then C would be a node inside B etc. Would compartment
map help
(I appreciate it may look strange but it is for a special purpose)

I have tried Feature Seq Initializer but this just creates A B & C but
doesn't
actually change the visual containment (unless I'm doing something wrong)

regards
Steve
Re: Deep containment [message #163780 is a reply to message #163582] Mon, 03 December 2007 15:30 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Steve,

> Is it possible somehow to create this visually such that A is a node,
> B is
> an internal rectangle with a border (perhaps floating inside A since A
> uses X-Y layout). Then C would be a node inside B etc. Would
Yes, i think it should be possible with GMF. To my understanding you should
create 3 node mappingd - for A, B, C nodes and no compartments. BTW, Am I
right that you are going to create Bs in A, Cs in B while working with diagram
or should A+B+C composition be represented as a "solid" node on diagram,
but creates as a structure in a model?

> I have tried Feature Seq Initializer but this just creates A B & C but
> doesn't actually change the visual containment (unless I'm doing something
Why do you use FSI here? Are you trying to create one B in A and one C in
B just on creating A node n diagram?

-----------------
Alex Shatalin
Re: Deep containment [message #164466 is a reply to message #163780] Wed, 05 December 2007 23:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: steve.orobec.bt.com

Hi Alex

I have the mapping file sorted & everything compiles

Node A has childref B and child B has childref C

When I use the generated editor I can put a B node in A, when I try to put
C
inside B the outline of C appears to the right of B (but outside its
boundary)
then disappears but the diagram behaves as though the C node is still
there.
(cardianality is 0..1 and no more C nodes are permitted).

I guess there is some feature to set, I tried a few combinations but with
no
luck. I want to see node C drawn inside B along with the attributes of C)

regards
Steve
Re: Deep containment [message #164579 is a reply to message #164466] Thu, 06 December 2007 16:40 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Steve,

> with no luck. I want to see node C drawn inside B along with the
> attributes of C)
It should be possible. We have a number of examples woring like this.. Can
you try to create compartment in B for C?

-----------------
Alex Shatalin
Re: Deep containment [message #164642 is a reply to message #164579] Thu, 06 December 2007 23:04 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: steve.orobec.bt.com

Hi Alex

I have created a compartment in B, I guess the idea is somehow create C in
this
compartment, if so how would I map C into this compartment?

regards
Steve
Re: Deep containment [message #164650 is a reply to message #164642] Fri, 07 December 2007 00:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: steve.orobec.bt.com

Hi Alex

Believe it or not, I have just managed this.

Not sure what I did yet as I did some updates and it worked

I'll let you know after I work it out ;-)

regards
Steve
Re: Deep containment [message #164682 is a reply to message #164650] Fri, 07 December 2007 11:11 Go to previous message
Eclipse UserFriend
Originally posted by: steve.orobec.bt.com

For anyone interested I did it by setting the following

In child reference
containment feature = children feature = containment link
referenced child = innermost nested node

regards
Steve
Previous Topic:Pragrammatically add a node to selection
Next Topic:Using the MultiPageEditor
Goto Forum:
  


Current Time: Fri Apr 26 18:22:54 GMT 2024

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

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

Back to the top