Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » the following mapping semantic candidates expression could not be correctly evaluated(Warning in Sirius)
the following mapping semantic candidates expression could not be correctly evaluated [message #1836992] Wed, 20 January 2021 16:26 Go to next message
Thomas Chiang is currently offline Thomas ChiangFriend
Messages: 50
Registered: March 2020
Member
Hi,

Somewhere along the line of my development I started to run into this warning whenever I create a new element in my graphical editor in Sirius: the following mapping semantic candidates expression could not be correctly evaluated : feature:RootElement. RootElement in this case being the class that I choose when I create a new project in Sirius.

I get this warning for every element that I want to create as well as any attributes that I set. I have no idea what this means or how this impacts my editor as everything appears to work correctly. Should I be concerned? Is there a solution to this warning?

[Updated on: Wed, 20 January 2021 16:29]

Report message to a moderator

Re: the following mapping semantic candidates expression could not be correctly evaluated [message #1837014 is a reply to message #1836992] Thu, 21 January 2021 02:07 Go to previous messageGo to next message
mike hill is currently offline mike hillFriend
Messages: 13
Registered: December 2020
Junior Member
I'm not an expert, but 'feature:featurename' is used to access named feature of the current element, https://www.eclipse.org/sirius/doc/specifier/general/Writing_Queries.html#specialized

[Updated on: Thu, 21 January 2021 02:07]

Report message to a moderator

Re: the following mapping semantic candidates expression could not be correctly evaluated [message #1837038 is a reply to message #1837014] Thu, 21 January 2021 10:03 Go to previous messageGo to next message
Steve Monnier is currently offline Steve MonnierFriend
Messages: 508
Registered: May 2011
Senior Member
Hello,

Indeed, you need to give the feature name that will be used to access the RootElements to be displayed by this mapping. If you see it as just a warning that does not prevent the element to be displayed, it is because if there is no candidate semantic expression to rely on, Sirius will look for elements of the same type in the model and display them. Depending on your model the elements displayed may be just as expected, but this is not recommanded for the performances of your modeler as it scans the whole model.

Best regards,
Steve


Steve Monnier - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: the following mapping semantic candidates expression could not be correctly evaluated [message #1837065 is a reply to message #1837038] Thu, 21 January 2021 14:45 Go to previous messageGo to next message
Thomas Chiang is currently offline Thomas ChiangFriend
Messages: 50
Registered: March 2020
Member
So here's where I might not understand. My RootElement is composed of everything else within my metamodel. In my VSM is it the Domain Class of my Diagram Description.

When I started I assumed that this is the same thing as the RootElement of my metamodel. As such it's typing would also be unique. Is that why I'm getting this warning?

index.php/fa/39775/0/

index.php/fa/39776/0/

This is how it is defined in my Ecore metamodel. Is there another way that I should be doing this, this was the intuitive approach that I thought was needed to create an editor in Sirius.

[Updated on: Thu, 21 January 2021 14:46]

Report message to a moderator

Re: the following mapping semantic candidates expression could not be correctly evaluated [message #1837115 is a reply to message #1837065] Fri, 22 January 2021 10:57 Go to previous messageGo to next message
Steve Monnier is currently offline Steve MonnierFriend
Messages: 508
Registered: May 2011
Senior Member
Hello,

I don't understand your question.

On your DiagramDescription your Domain Class is RootElement. This means that you can create this kind of diagram on a semantic element typed RootElement. Then you have Node/Container/Edge mapping in order to specify the elements that will be displayed on your diagram. The warning that you have tells you that you have a mapping with a semantic candidate expression "feature:RootElement" and this expression is wrong as RootElement is a type, not a feature. If you want to display on a diagram the RootElement (the one you created the diagram on) then the expression would just be "aql:self". If you want to display elements contained by your reference process then the expression would be "feature:process" (I don't know the Domain Class for this mapping as I do not seen what is at the other end of your reference on the screenshot).

Best regards,
Steve


Steve Monnier - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: the following mapping semantic candidates expression could not be correctly evaluated [message #1837132 is a reply to message #1837115] Fri, 22 January 2021 14:16 Go to previous message
Thomas Chiang is currently offline Thomas ChiangFriend
Messages: 50
Registered: March 2020
Member
Ok awesome, that was indeed the case as I was looking into how I would be able to nest models of RootElement within itself and I did end up having an element that was labelled as feaature:RootElement despite it being a type. Thank you for the clarification!

Do you have an idea of how I can approach nesting then? Would that require another Ecore metamodel? And how can I set up dependencies between both of them so that they are connected so that when I create a new model of type RootElement within a different project, the diagram description will be created as well?
Previous Topic:Direct edit label on begin/end label of edges
Next Topic:Embedding OCL editor in Sirius
Goto Forum:
  


Current Time: Sat Apr 17 00:25:46 GMT 2021

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

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

Back to the top