Bug 540494 - Error markers are arbitrarily located on nodes or related relation based edges
Summary: Error markers are arbitrarily located on nodes or related relation based edges
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Diagram (show other bugs)
Version: 6.1.0   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2018-10-26 04:14 EDT by Dominik Mosen CLA
Modified: 2021-01-29 09:23 EST (History)
3 users (show)

See Also:


Attachments
screenshots: meta model / misplaced error marker (14.02 KB, application/x-zip-compressed)
2018-10-26 04:14 EDT, Dominik Mosen CLA
no flags Details
MarkerPlugins (129.06 KB, application/x-zip-compressed)
2021-01-29 05:42 EST, Laurent Fasani CLA
no flags Details
ecoreProject (3.98 KB, application/x-zip-compressed)
2021-01-29 09:23 EST, Laurent Fasani CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dominik Mosen CLA 2018-10-26 04:14:00 EDT
Created attachment 276383 [details]
screenshots: meta model / misplaced error marker

Steps to reproduce
1. Create the simple Ecore model according to the attached screenshot (meta_model.png in the zip).
2. Implement the 'validName' constaint (e.g. the name should not containt the character 'a').
3. Create a Sirius diagram representation. For the class 'Container' create a node representation and for the reference 'contains' create a relation based edge representation.
4. Create an instance of the Ecore model, play around with instances of 'Container', add 'contains' relations between them and define invalid names for some of the 'Container' instances.
5. Validate the diagram.
6. Repeat steps 4 and 5 until you end up in a situation like in the attached screenshot (error_markers.png in the zip).

As you can see, one of the error markers is positioned on a node and the other one is positioned on an edge. I would expect error markers always to be positioned on nodes and never on relation based edges.
Comment 1 Florian Barbin CLA 2018-12-06 05:53:49 EST
Issue marked as confirmed.
Comment 2 Tamas Miklossy CLA 2019-09-04 07:41:49 EDT
See also forum thread https://www.eclipse.org/forums/index.php?t=msg&th=1078861&goto=1736585&
Comment 3 Laurent Fasani CLA 2021-01-29 05:39:41 EST
I did not manage to reproduce the issue.

I created the metamodel described in the attached screenshot and a VSM containing a ViewValidationRule and a Semantic Validation Rule.

SCenario:
* import and deploy the project Marker, Marker.edit and Marker.editor
* import the MarkerExample project
* Start the validation 
-> OK: for ViewValidationRule, the marker AND the decorators are created on both the node and the edge.
-> OK: for Semantic Validation Rule, the marker AND the decorators are created on the node.

For Semantic Validation Rule, it is normal that the marker is not displayed on edge because if the Edge.target==Edge.get sourcecode.getTraget, the marker is not created because it is considered as a duplicate.
Comment 4 Laurent Fasani CLA 2021-01-29 05:42:52 EST
Created attachment 285412 [details]
MarkerPlugins
Comment 5 Laurent Fasani CLA 2021-01-29 09:15:27 EST
ok I ended up figuring out that it was about EMF VAlidation and not Sirius VSM Validation rule.

I effectively reproduce the issue with the ecoreProject attached project but not with the MarkerPlugin Meta-model
I guess there should be some EMF validation rules on the marker meta-model so that I can reproduce with this meta-model.
The rules already exist on the ecore meta-model. 
For example, there is an error if the name of the EClass is null.
Comment 6 Laurent Fasani CLA 2021-01-29 09:23:57 EST
Created attachment 285415 [details]
ecoreProject