Bug 508656 - Property Validation Rules are available outside of the Properties View DSL
Summary: Property Validation Rules are available outside of the Properties View DSL
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Properties (show other bugs)
Version: 4.1.1   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2016-12-05 04:06 EST by Stephane Begaudeau CLA
Modified: 2016-12-05 10:42 EST (History)
1 user (show)

See Also:


Attachments
Reproduction case (88.12 KB, application/octet-stream)
2016-12-05 04:06 EST, Stephane Begaudeau CLA
no flags Details
Screenshot of the bug (100.46 KB, image/png)
2016-12-05 04:07 EST, Stephane Begaudeau CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stephane Begaudeau CLA 2016-12-05 04:06:18 EST
Created attachment 265716 [details]
Reproduction case

Steps to reproduce:
- Use the attached odesign file
- Select the Validation rules set of the first diagram available
- You can create a Property Validation Rule inside

See the attached screenshot to have a look at the issue.
Comment 1 Stephane Begaudeau CLA 2016-12-05 04:07:02 EST
Created attachment 265717 [details]
Screenshot of the bug
Comment 2 Stephane Begaudeau CLA 2016-12-05 04:16:59 EST
There are two ways to fix this issue:

1 - Improve Sirius
We can make sure that Sirius does not use the child extender mechanism in order to compute the child of the ValidationRulesSet. While this solution should work without having any impact on the meta-model, it creates a special use case for the Validation Rules in the Edit part of Sirius. Sirius does not have to known that the Properties DSL exists but it would be modified to work nicely with it.

I do not recommend this solution

2 - Modify the Properties DSL
This issue comes from the fact that the Validation Rules of the Properties DSL extends the ValidationRule concept from Sirius, this inheritance should be removed and the PropertyValidationRule should have directly all the necessary concepts (audits and fixes). It would also create a very small change in behavior since both validation rules supported by the Property DSL would not have a common ancestor anymore as such they would have to be contained in two different structural features or the Semantic Validation rules would have to be migrated to a Properties DSL version with exactly the same properties in order to keep the order of the elements (this is the solution that I would recommend).

The existing PropertyValidationRules previously created in diagrams, tables and trees could be migrated by:

- recreating them in the group of the first widgets that they are referencing (but it does only work if they are referencing any widget or if there are a Properties View Description in the odesign)
- transforming them in an incomplete Semantic Validation Rules