TopNodeReference Creation [message #1033440] |
Thu, 04 April 2013 08:20  |
Eclipse User |
|
|
|
Hi!
I'm trying to create a Top Node Reference having a Node Mapping & Feature Label included in my .gmfmap file but i get the following error:
Top level node 'Containment Feature' must be available in the diagram 'Domain Element' or its super-class
I googled this error but the answers that were provided wasn't of much help actually!
Here's the scenario that i'm working on, i've a House EClass, which has an EReference to Garage EClass.
-'House' EType attribute is set to 'Garage', and 'Garage' has to attributes for name & value. Please check the attached screen shot.
at the .gmfmap, i created a TopNodeReference having 'Containment Feature' 'House.Garages.Garage', and the Node mapping has the EClass 'Garage' as an Element. I attached a snap shot for the .gmfmap as well.
Does anyone have any idea how to get this error solved ?
Thx!
Mostafa.
|
|
|
Re: TopNodeReference Creation [message #1036070 is a reply to message #1033440] |
Sun, 07 April 2013 23:10   |
Eclipse User |
|
|
|
i've found a sample model that's doing something similar to what i'm trying to do, i tried to apply the same thing in my model but still i get the same error "Top level node 'Containment Feature' must be available in the diagram 'Domain Element' or its super-class" does anybody got any idea how to solve that?
|
|
|
Re: TopNodeReference Creation [message #1036500 is a reply to message #1036070] |
Mon, 08 April 2013 13:07   |
Eclipse User |
|
|
|
Hi Mostafa,
I think you are using the incorrect DiagramNode in your NodeMapping.
The DiagramNode should be Node of your graph-model (or a standalone label, that is not a childfeature of another figure).
So maybe your assigned ImportNodelCloneName is not a Node.
Please verify this.
Regards
Thomas
|
|
|
Re: TopNodeReference Creation [message #1037873 is a reply to message #1036500] |
Wed, 10 April 2013 05:37   |
Eclipse User |
|
|
|
Hi Thomas,
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.
Thx!
Mostafa.
|
|
|
Re: TopNodeReference Creation [message #1039099 is a reply to message #1037873] |
Thu, 11 April 2013 19:13   |
Eclipse User |
|
|
|
Hi Mostafa,
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)
-> SystemRoot
-----> 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?
Regards
Thomas
[Updated on: Thu, 11 April 2013 19:15] by Moderator Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04768 seconds