Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Constraints validation when entering a value in Sirius Editor
Constraints validation when entering a value in Sirius Editor [message #1850735] Tue, 15 March 2022 17:37 Go to next message
Francesco Bedini is currently offline Francesco BediniFriend
Messages: 26
Registered: March 2018
Junior Member
Hi, I'm using Sirius 7.0.0 at the moment.

I have created a DataType and I have assigned it a Constraint, which is implemented in Java editing the generated source code.

Using the standard generated ecore property editor, the constraint is checked when any character is typed into that field, and prevents the user from inserting an invalid value (showing the error on the bottom left, and restoring the previous property value.
index.php/fa/41775/0/

Doing the same with the Sirius Editor (from the "Main" tab), the invalid value is just accepted without any problem:
index.php/fa/41774/0/

Am I doing something wrong? Any way to prevent that?
  • Attachment: sirius.png
    (Size: 1.60KB, Downloaded 147 times)
  • Attachment: emf.png
    (Size: 5.05KB, Downloaded 154 times)
Re: Constraints validation when entering a value in Sirius Editor [message #1851303 is a reply to message #1850735] Fri, 01 April 2022 19:48 Go to previous message
Pierre-Charles David is currently offline Pierre-Charles DavidFriend
Messages: 638
Registered: July 2009
Senior Member
Sorry for the late response.
The default properties shown in the "Main" tab are dynamically infered using rules which do not take these constraints in consideration.
In theory I guess that would be possible, but this is not planned.

Overriding the default (infered) properties view with your own (see https://www.eclipse.org/sirius/doc/specifier/properties/Properties_View_Description.html) it might be possible to handle these with appropriate validation rules (see https://www.eclipse.org/sirius/doc/specifier/properties/Properties_View_Description.html#validation_rules in particular).


Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Running Acceleo from within Sirius
Next Topic:How Can Users Change Font Size?
Goto Forum:
  


Current Time: Tue Aug 09 18:07:49 GMT 2022

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

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

Back to the top