Unrecognized variables in .odesign [message #1613752] |
Thu, 12 February 2015 16:51  |
Eclipse User |
|
|
|
Hi all,
I've been trying to create an editor for my metamodel with sirius but I seem to end up with different errors each time. For instance, I now have a .odesign that seemed to work a while back but it does not anymore. The error happens when I try to validade it, showing many "unrecognized variable" errors.
What happens is that I set an operation to create an instance of a class from my metamodel in my .odesign file and name this newly created instance. However when I try to reference the instance variable the tool doesn't seem to find it, giving me the unrecognized variable error.
I am attaching an image that shows part of my specification as example. In (1) I create the instance and name it "datatype", and when I try to reference it in the highlighted line it isn't recognized. Could it be that I used the "change context" operation and it got lost? If it is so, how can I reference that instance? Besides, the same thing happens when I use the "for" operator, setting the "iterator name" property and, without changing the context, I try to reference the variable and it gives me the same error.
Any hints?
Attachment: error.png
(Size: 21.03KB, Downloaded 121 times)
|
|
|
Re: Unrecognized variables in .odesign [message #1619509 is a reply to message #1613752] |
Mon, 16 February 2015 11:30  |
Eclipse User |
|
|
|
Hi,
Le 13/02/2015 16:15, Vinicius Sobral a écrit :
> Hi all,
>
> I've been trying to create an editor for my metamodel with sirius but I seem to end up with different errors each time. For instance, I now have a .odesign that seemed to work a while back but it does not anymore. The error happens when I try to validade it, showing many "unrecognized variable" errors.
>
> What happens is that I set an operation to create an instance of a class from my metamodel in my .odesign file and name this newly created instance. However when I try to reference the instance variable the tool doesn't seem to find it, giving me the unrecognized variable error.
>
> I am attaching an image that shows part of my specification as example. In (1) I create the instance and name it "datatype", and when I try to reference it in the highlighted line it isn't recognized. Could it be that I used the "change context" operation and it got lost? If it is so, how can I reference that instance? Besides, the same thing happens when I use the "for" operator, setting the "iterator name" property and, without changing the context, I try to reference the variable and it gives me the same error.
>
> Any hints?
>
The validation still returns false errors: did you test your VSM ?
From your screenshot, I do not see why datatype should not be available
in your set operation but I think your value expression might simply be
var:datatype or [datatype\], you are tring to create a Set (collection
with no duplicates) but you add the same element twice.
Regards,
--
Maxime - Obeo
Need professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
Powered by
FUDForum. Page generated in 0.03054 seconds