Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Do I need a Top Node Reference anymore?
Do I need a Top Node Reference anymore? [message #234005] Wed, 17 June 2009 17:48 Go to next message
Conor Missing name is currently offline Conor Missing nameFriend
Messages: 159
Registered: July 2009
Senior Member
Hi all,

I need to change the way my GMF editor works. At the moment I have a node
A with a compartment that nodes B, C and D can go into. This compartment
is a non-list layout so nodes can be placed anywhere and can be moved from
one compartment to another.

Presently Nodes B, C and D also go on the Canvas of the editor. I want to
make it so B, C and D will ONLY go in the compartment of A and not on the
Canvas. Also need to keep the non-list layout in the compartment.

I've changed the ecore file so the canvas contains node A and node A
contains B, C and D (contains = line with black diamond in
ecore_diagram?). In the gmfmap file I have a compartment with child
references to node mapping for each of B, C and D.

I've tried to remove the Top Node References of B, C and D from the top
Mapping part of the gmfmap file. Mapping will validate and the code
generates fine but when I run the editor it will only work with the list
layout, so I can add nodes B, C and D only to the compartment but only in
a list layout. When I change the list layout to be false the nodes won't
add to either Canvas or the compartment.

I've also tried leaving the Top Node References of B, C and D in (thinking
this may effect the non-list layout?) but then I get errors:

1) If Containment Feature is the compartment of A, the model will validate
but when gmfgen file is created it has the error Top level node
'Containment Feature' must be available in the diagram 'Domain Element' or
its super-class.

2) If Containment Feature is the Canvas the model won't validate and error
says 'Containment Feature' must reference the same class or super type of
'Domain Meta Element' of the reference node.

These errors make sense to me as I only want the compartment of A to
contain B, C and D so removing them should be okay?

Do I need the Top Node References anymore now that I don't want it to be
possible to add the nodes B, C and D to the Canvas?

Am I missing something with making the non-list layout available in the
compartment? (do I need to do anything else other than change the list
layout setting in the gmfgen file)


Re: Do I need a Top Node Reference anymore? [message #234064 is a reply to message #234005] Thu, 18 June 2009 11:45 Go to previous message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Gaff,

Try modifying .gmfgen model in order to set GenCompartment.isListLayout property
to "false" for the corresponding copartment and regenerate code.

Alex Shatalin
Previous Topic:Get the domain model file
Next Topic:Layout information persistence
Goto Forum:

Current Time: Thu Feb 25 02:07:30 GMT 2021

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

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

Back to the top