|Re: TopNodeReference Creation [message #1037873 is a reply to message #1036500]
||Wed, 10 April 2013 01:37
| Mostafa Fouly
Registered: December 2011
Thanks for your reply!
Indeed the diagram node is a node of my graph model, it's not a child feature of any other figure.
As i mentioned in the last post i changed the EClass' names, i'm trying to make a bit for being more understandable.
The case now is i'm trying to create a TopNodeReference called Folder, but still u get the same error! i got no clue what this error means, i double checked all the properties and for me it seems fine.
I attached some snap shots for the .gmfmap and the .ecore maybe it'll make the picture a bit more clear.
|Re: TopNodeReference Creation [message #1039099 is a reply to message #1037873]
||Thu, 11 April 2013 15:13
| Thomas Beyer
Registered: February 2013
in your mappingmodel, your canvas mapping defines the domain element as the root of your diagram.
All Top-Level-NodeMapping's domain element must be set with a containment-feature of the domain root.
For example (in accordance with your file/folder concept)
-----> 0..* folders: Folder
---------> 0..* subFolders: Folder
---------> 0..* folderFiles: File
-----> 0..* files: File
So in your gmf-mapping-model the SystemRoot would be the domain element of the canvas mapping.
Now you only have the 2 choices to create topnoderefences for Folder (only for the feature:folders) and File (only for the feature:files).
You would then be able to create nodemappings below Folder for the features subFolders and folderFiles.
So you need an explicit feature from your root to your topnodereferences on the domain model level.
In your example, this means, your canvas mapping must have Folder set as the domain element.
Can your verify this?
[Updated on: Thu, 11 April 2013 15:15]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.01665 seconds