Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 10:13 Go to next message
Marcel Jezierski is currently offline Marcel JezierskiFriend
Messages: 6
Registered: May 2021
Junior Member
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: Sat, 05 June 2021 01:01]

Report message to a moderator

Re: Creating sub-node problem. [message #1841994 is a reply to message #1841957] Sun, 06 June 2021 15:16 Go to previous messageGo to next message
Pierre-Charles David is currently offline Pierre-Charles DavidFriend
Messages: 701
Registered: July 2009
Senior Member
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.


Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Creating sub-node problem. [message #1843123 is a reply to message #1841994] Fri, 16 July 2021 08:35 Go to previous message
Marcel Jezierski is currently offline Marcel JezierskiFriend
Messages: 6
Registered: May 2021
Junior Member
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: Thu Mar 28 10:05:38 GMT 2024

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

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

Back to the top