Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Property validation rules
Property validation rules [message #1769944] Sun, 06 August 2017 18:29 Go to next message
sonny selhorst is currently offline sonny selhorstFriend
Messages: 60
Registered: May 2015
Member
Dear,

I am trying to add a property validation rule, but it isn't working. I have added the property as a Target. Is it correct if I refer to it as 'self' in order to audit it?

It's quite simple: an element in my metamodel has a cardinality (EString), which can only be a positive integer or *, which means it's unbounded.

If a user enters a negative number, it displays an error upon validation that the cardinality must be a number larger than 0 or unbounded.

I tried aql:self=* or self.toInteger()>0 but it doesn't display any error in my diagram.

Thank you in advance,

Kind regards,
Sonny
Re: Property validation rules [message #1770018 is a reply to message #1769944] Mon, 07 August 2017 14:45 Go to previous messageGo to next message
Stephane Begaudeau is currently offline Stephane BegaudeauFriend
Messages: 454
Registered: April 2010
Location: Nantes (France)
Senior Member

Hi,

In your situation, self will be the semantic element defined by the semantic candidate expression of the group. It is the same "self" as in the valueExpression of your widget.

Regards,

Stephane Begaudeau, Obeo
Re: Property validation rules [message #1770019 is a reply to message #1769944] Mon, 07 August 2017 14:47 Go to previous messageGo to next message
Florian Barbin is currently offline Florian BarbinFriend
Messages: 236
Registered: August 2010
Senior Member
Hi Sonny,

In that case the self variable will reference the semantic element, not the property.

Regards,

Florian
Re: Property validation rules [message #1770036 is a reply to message #1770019] Mon, 07 August 2017 16:12 Go to previous message
sonny selhorst is currently offline sonny selhorstFriend
Messages: 60
Registered: May 2015
Member
Thank you very much, I was able to solve the problem.

Have a great day!
Previous Topic:Edge labels with seperate properties view
Next Topic:Conditional label icon - bug?
Goto Forum:
  


Current Time: Thu Apr 09 21:50:27 GMT 2020

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

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

Back to the top