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

Bug 481386

Summary: Validation in Diagram extension not working
Product: [Modeling] Sirius Reporter: Wilbert Alberts <wilbert.alberts>
Component: DiagramAssignee: Laurent Fasani <laurent.fasani>
Status: CLOSED FIXED QA Contact: Julien Dupont <julien.dupont>
Severity: normal    
Priority: P3 CC: esteban.dugueperoux, julien.dupont, laurent.fasani, laurent.redor, pierre-charles.david, wilbert.alberts, yash.s.khatri
Version: 3.1.0Keywords: triaged
Target Milestone: 6.0.0   
Hardware: PC   
OS: Windows 7   
See Also: https://git.eclipse.org/r/121800
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=27b00a81ce506c870da28da643b1c52a5a3acbc7
https://git.eclipse.org/r/122571
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=dcbc85f08dd4c85ff97d528f116bb72a965ec750
Whiteboard:
Bug Depends on:    
Bug Blocks: 534305    
Attachments:
Description Flags
Three projects that reproduce the bug none

Description Wilbert Alberts CLA 2015-11-04 04:14:14 EST
Created attachment 257720 [details]
Three projects that reproduce the bug

Hi,

I tried to create to vsp's, one containing a diagram extension of the other. Both of them contain validations but somehow the validations in the extension don't work.

Did I make a mistake or did I trigger a bug?

I created a small example (attached). MasterProject contains the extended viewpoint and ChildProject contains the extension. The ExampleProject contains a representation of an ecore model that I use to validate.

The validation in Master attemps to ensure that names are not longer then 4 characters. The validation in Child ensures that names are at least 3 characters. (So only classes with names of three characters long are acceptable).

When I validate the diagram, it seems that only the validation in the MasterViewpoint are executed.

Any ideas?

Greetings,
Wilbert.
Comment 1 Esteban DUGUEPEROUX CLA 2015-11-04 04:31:23 EST
I confirm the bug, thanks.
Comment 2 Yash Khatri CLA 2018-03-02 04:01:40 EST
Is there any update on this bug? I am facing the same problem even with Sirius 5.0.1.
Comment 3 Pierre-Charles David CLA 2018-03-02 05:36:15 EST
Hi,
this is not in our priorities right now, but I'm putting the ticket on the list for 6.0, at least to analyze it further. I can't guarantee it will get fixed, it will all depend on the effort required.
Regards,
Comment 4 Eclipse Genie CLA 2018-04-26 10:35:30 EDT
New Gerrit change created: https://git.eclipse.org/r/121800
Comment 5 Laurent Fasani CLA 2018-04-27 10:03:02 EDT
Steps to validate:
* import the three attached projects
MasterProject contains the extended viewpoint and ChildProject contains the extension. The validation in Master attemps to ensure that names are not longer then 4 characters. The validation in Child ensures that names are at least 3 characters. (So only classes with names of three characters long are acceptable).
The ExampleProject contains a representation of an ecore model
* open the diagram in ExampleProject
* Start Validation, right clicking on diagram background
->N2 should have a warning decoration
Comment 6 Pierre-Charles David CLA 2018-05-01 11:31:17 EDT
Reopening: the patch is ready, but not merged yet.
Comment 8 Pierre-Charles David CLA 2018-05-02 08:34:02 EDT
Patch merged, with tests: 27b00a81ce506c870da28da643b1c52a5a3acbc7.
Comment 9 Eclipse Genie CLA 2018-05-14 08:20:00 EDT
New Gerrit change created: https://git.eclipse.org/r/122571
Comment 11 Laurent Redor CLA 2018-06-27 11:55:01 EDT
Available in Sirius 6.0.0, see https://wiki.eclipse.org/Sirius/6.0.0 for details