Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Adding a node does not work
Adding a node does not work [message #1861393] Tue, 10 October 2023 18:28 Go to next message
Ad Mal is currently offline Ad MalFriend
Messages: 7
Registered: October 2023
Junior Member
Hello all,

let me write it first: Thanks to the authors for the excellent Sirius!

And now I need your support. Attached is my metamodel and my definition of "Node Creation Server". Most things do work, but as a result I get the node with a red cross. What am I doing wrong?

EDIT and additional information:

According to another post "The red cross on the graphical element means the semantic element behind has been removed." In my case it means that there is no correct instance creation, right?

According to
https://eclipse.dev/sirius/doc/specifier/general/Model_Operations.html#create_instance "The reference name must correspond to a valid containment reference for the context element of the operation, otherwise the newly created object will not be properly integrated into the semantic model." So I should create the instance inside the "asset" container first and connect it to the "contains" reference or just set the "isLocatedIn" reference to the container that was clicked. Am I right on that? Unfortunately this does not work:

1. Click on a container
2. Change context to "System"
3. Create instance within the "asset" containment
4. Set the "isLocatedIn" reference to the clicked container

Why does it not work? Maybe I'm making a basic mistake somewhere. Can you help me please?

Kind regards

[Updated on: Wed, 11 October 2023 16:35]

Report message to a moderator

Re: Adding a node does not work [message #1861441 is a reply to message #1861393] Thu, 12 October 2023 13:51 Go to previous messageGo to next message
Pierre-Charles David is currently offline Pierre-Charles DavidFriend
Messages: 705
Registered: July 2009
Senior Member
You're right that you should create the instance inside the "asset" container first, so that the newly created element is properly attached to the rest of the model.
The first "Create Instance" is incorrect, as the reference name given ("contains"), despite its name, is not a containment reference.

The browse expression on the second "Change Context", i.e. "aql:m::System" is incorrect. It refers to a type (the m::System EClass), which it should return return the model element instance to "go to".

The steps you mention look right (except the issue above), except "Set the "isLocatedIn" reference to the clicked container". The "isLocatedIn" relation is not between an asset and its container System, but with a Vlan. So it's more like "Set the "isLocatedIn" reference to the one of the clicked container's Vlan".


Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Adding a node does not work [message #1861480 is a reply to message #1861441] Sun, 15 October 2023 11:28 Go to previous messageGo to next message
Ad Mal is currently offline Ad MalFriend
Messages: 7
Registered: October 2023
Junior Member
Dear Pierre-Charles,

thank you very much. Now everything is working as expected. I'm changing the context using aql:self.eContainer(), creating the instance of server and setting isLocatedIn to var:container.

Afterwards I created an Update Site like described here https://wiki.eclipse.org/Sirius/Tutorials/UpdateSiteTutorial#Test_the_Update_Site, but I cound not select a Viewport. I figured out that the Model File Extension was set to *, so I changed it. I created a new future and update project but still cannot see any viewports to select. The metamodel is set correctly in the diagram description metamodel property.

Any ideas?

Kind regards

Re: Adding a node does not work [message #1861532 is a reply to message #1861480] Tue, 17 October 2023 17:51 Go to previous message
Ad Mal is currently offline Ad MalFriend
Messages: 7
Registered: October 2023
Junior Member
To be more precise. I create a new modeling project. Then I add a sample model that appears in the selection box with the previously defined extension. So all is fine. But in my project I can neither select a viewport nor define a new representation, see screenshots. What is wrong?

index.php/fa/43592/0/
index.php/fa/43593/0/

I would be very happy about support.

Kind regards
Previous Topic:Step by step instructions for embedding xtext into Sirius
Next Topic:creating services with lambda arguments
Goto Forum:
  


Current Time: Mon Oct 14 20:56:45 GMT 2024

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

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

Back to the top