Skip to main content



      Home
Home » Eclipse Projects » Sirius » Creating sub-node problem.(Newly created sub-node related to container has red cross mark. )
Creating sub-node problem. [message #1841957] Fri, 04 June 2021 06:13 Go to next message
Eclipse UserFriend
Hi,
I have model representing a card game. Card has many properties. I created diagram with tool which allows to create cards(containers) and adding properties(sub-nodes) to them. The problem is that newly created property is marked by red cross and I cannot modify it. Inside tool I create instance of property and I set relation between card and property. Should I do something else? In console i get message: "Error saving resource. The object is not contained in a resource."I put here some screens to make it more clear.
index.php/fa/40583/0/
index.php/fa/40584/0/
Thanks in advance,
Jezierski Marcel

[Updated on: Fri, 04 June 2021 21:01] by Moderator

Re: Creating sub-node problem. [message #1841994 is a reply to message #1841957] Sun, 06 June 2021 11:16 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

In the "Create Instance" operations you must specify a "Reference Name". It must be the name of a *containment reference* of the parent element (see https://www.eclipse.org/sirius/doc/specifier/general/Model_Operations.html#create_instance). Otherwise Sirius will indeed create and instance, set the reference from the "parent" to the new instance, but if that reference is not a containment reference the new instance is dangling and not really attached to the rest of the model and will not be saved as it is not considered part of any resource (hence the error message).

It's possible that you misconfigured your metamodel and forgot to check the "Containment" property for the EReference between Card and CardProperty.
Re: Creating sub-node problem. [message #1843123 is a reply to message #1841994] Fri, 16 July 2021 04:35 Go to previous message
Eclipse UserFriend
Thank you for your reply. It is working now.
Previous Topic:Elements expanding but not shrinking
Next Topic:Problem after installing Acceleo
Goto Forum:
  


Current Time: Wed Jul 23 02:23:30 EDT 2025

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

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

Back to the top