Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » TopNodeReference Creation(Top level node 'Containment Feature' must be available in the diagram 'Domain Element' or its super-class)
TopNodeReference Creation [message #1033440] Thu, 04 April 2013 08:20 Go to next message
Mostafa Fouly is currently offline Mostafa FoulyFriend
Messages: 24
Registered: December 2011
Junior Member
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 Go to previous messageGo to next message
Mostafa Fouly is currently offline Mostafa FoulyFriend
Messages: 24
Registered: December 2011
Junior Member
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 Go to previous messageGo to next message
Thomas Beyer is currently offline Thomas BeyerFriend
Messages: 55
Registered: February 2013
Member
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 Go to previous messageGo to next message
Mostafa Fouly is currently offline Mostafa FoulyFriend
Messages: 24
Registered: December 2011
Junior Member
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 Go to previous messageGo to next message
Thomas Beyer is currently offline Thomas BeyerFriend
Messages: 55
Registered: February 2013
Member
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]

Report message to a moderator

Re: TopNodeReference Creation [message #1039854 is a reply to message #1039099] Fri, 12 April 2013 17:50 Go to previous messageGo to next message
Mostafa Fouly is currently offline Mostafa FoulyFriend
Messages: 24
Registered: December 2011
Junior Member
hey Thomas,

I think it should be fine now, please find the diagram attached, it's still not working tho! i'm still having the same error.

Grtz,
Mostafa.

[Updated on: Tue, 30 April 2013 01:20]

Report message to a moderator

Re: TopNodeReference Creation [message #1043733 is a reply to message #1039854] Thu, 18 April 2013 04:02 Go to previous message
Mostafa Fouly is currently offline Mostafa FoulyFriend
Messages: 24
Registered: December 2011
Junior Member
So i tried to update the diagram as seen in the attachment, but still having the same error!
Is there any way that i can overcome that error?
  • Attachment: GMF1.JPG
    (Size: 14.14KB, Downloaded 52 times)
  • Attachment: GMF2.JPG
    (Size: 13.68KB, Downloaded 49 times)
  • Attachment: GMF3.JPG
    (Size: 14.28KB, Downloaded 46 times)
  • Attachment: GMF4.JPG
    (Size: 13.66KB, Downloaded 56 times)

[Updated on: Tue, 30 April 2013 01:20]

Report message to a moderator

Previous Topic:Alter the location and the background color of EditPar
Next Topic:Tipical Error: Can't find genClass for class 'nameClass' in package 'namePackage'
Goto Forum:
  


Current Time: Mon Dec 22 16:28:17 GMT 2014

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

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