Skip to main content



      Home
Home » Eclipse Projects » Sirius » Cannot create a new container(Cannot create a new container element for my model)
Cannot create a new container [message #1792816] Tue, 24 July 2018 07:00 Go to next message
Eclipse UserFriend
Hello,

I have a viewpoint and a new diagram representation. In the default layer I then added a container called EntityContainer[ulmDsl2.Entity].

I want to allow users to create entities [EntityContainers] so I created a section and added a New Element (Container) Creation. In the Begin block, following a Sirius tutorial I added a Change Context with 'var:container' as browse expression.

In the new create instance operation I don't know what to put as Reference Name. From what I understand, the container variable points to a Model object but I need to add the newly created entity not in a feature of the Model object but in Model->contexts->entities.

If, in the reference name I use 'contexts.entities' I got the following error: Invalid feature 'contexts.entities' for the following types: [ulmDsl2.Model]

Is there a way to tell I want to add the newly created entity in 'contexts.entities'?

Thanks for your help.

Using: Eclipse 4.7.3, xText 2.12.0 & Sirius 5.0.1
Code available at: https://github.com/lvanzeun/ulm-xtext-test.git
Re: Cannot create a new container [message #1793207 is a reply to message #1792816] Wed, 01 August 2018 09:54 Go to previous message
Eclipse UserFriend
Hello

"Reference Name" is the name of the feature, the created instance set on. The context is the instance on which the created instance will be attached to.
In your case, the context should be aql:container.contexts and the "Reference name" should be "entities"

more information in the documentation: https://www.eclipse.org/sirius/doc/specifier/general/Model_Operations.html

Regards
Previous Topic:Issue while creating the child node in tree description in eclipse sirius
Next Topic:Element edges are not deleting from container
Goto Forum:
  


Current Time: Sun Jul 06 02:33:11 EDT 2025

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

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

Back to the top