Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 470596

Summary: Add id/name to validation rule
Product: [Modeling] Sirius Reporter: Nathalie Lepine <nathalie.lepine>
Component: CoreAssignee: Maxime Porhel <maxime.porhel>
Status: CLOSED FIXED QA Contact: Jessy Mallet <jessy.mallet>
Severity: enhancement    
Priority: P3 CC: florian.barbin, jessy.mallet, maxime.porhel, pierre-charles.david, vincent.richard
Version: 3.0.0Keywords: triaged
Target Milestone: 3.1.3   
Hardware: PC   
OS: All   
See Also: https://git.eclipse.org/r/51732
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=94fc3be44a2ce33bd8e6fabd2a771c28b1de2df5
https://git.eclipse.org/r/59658
https://git.eclipse.org/r/60298
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=17827bf5fa3165e168db755cb07d157f9ee713f3
Whiteboard: trivial
Bug Depends on:    
Bug Blocks: 481733    

Description Nathalie Lepine CLA 2015-06-19 10:25:48 EDT
A feature request to add an id/name for the validation rules.

Rules URI is not stable:
rule=platform:/plugin/project.design/description/my.odesign#//@ownedViewpoints[name='myVP']/@ownedRepresentations[name='MyDiagram']/@validationSet/@ownedRules.0
"@ownedRules.0" not stable


Discussed with Cédric, it must be in eKeys to have a more robust uri.
The problem is if you move your rules between two sirius versions, the user will have a marker with bad uri rule. Workaround, do not move the rules after delivering, easy to do with unit test.
Comment 1 Pierre-Charles David CLA 2015-06-19 10:34:14 EDT
Technically, it seems it should be enough to make ValidationRule inherit from IdentifiedElement and re-generate the metamodels. No migration should be needed.
Comment 2 Eclipse Genie CLA 2015-07-10 09:46:48 EDT
New Gerrit change created: https://git.eclipse.org/r/51732
Comment 4 Maxime Porhel CLA 2015-08-03 10:06:02 EDT
Correction has been merged.
Comment 5 Jessy Mallet CLA 2015-09-28 10:33:35 EDT
Validated with Sirius 3.1.0.201509241504
Comment 6 Pierre-Charles David CLA 2015-10-16 09:09:18 EDT
Available in Sirius 3.1.0.
Comment 7 Eclipse Genie CLA 2015-11-04 08:07:12 EST
New Gerrit change created: https://git.eclipse.org/r/59658
Comment 8 Maxime Porhel CLA 2015-11-09 10:51:39 EST
I moved the proposed patch to Bug 481733. Clone of this bug for a fix on master. 

The main work of this ticket has been done for Sirius 3.1.0, I reopen it and set the new fix version to 3.1.3.
Comment 9 Eclipse Genie CLA 2015-11-13 04:38:59 EST
New Gerrit change created: https://git.eclipse.org/r/60298
Comment 11 Maxime Porhel CLA 2015-11-13 09:41:13 EST
Fixed on v3.1.x branch for 3.1.3
Comment 12 Florian Barbin CLA 2015-11-20 12:01:54 EST
Verified on Sirius 3.1.3.201511201007
Comment 13 Pierre-Charles David CLA 2015-12-08 10:30:21 EST
*** Bug 483889 has been marked as a duplicate of this bug. ***
Comment 14 Pierre-Charles David CLA 2015-12-15 05:26:26 EST
Available in Sirius 3.1.3 released on 2015-12-08.