Customizing markers location with EMF Validation [message #1736496] |
Wed, 29 June 2016 15:39  |
Eclipse User |
|
|
|
Hi,
I have a Sirius modeller, based on an EMF model. So far, so good.
My EMF model comes with constraints that are handled through EMF validation. So, no validation defined in my *.odesign file.
When I validate a diagram, these constraints are correctly invoked.
However, the messy part occurs with the markers location. Indeed, my diagram's links are based on relations (i.e. EMF references), and not on elements. It means that when Sirius looks for an edit part to display the marker, it can pick up the node... or one of the edges whose source is this node. The underlying model element is the same for all of them.
And that's what happens.
When an element contains an error, the marker is not always associated with the DNode part. It is sometimes on an edge. And not always the same edge, depending on their configuration. This is far from being convenient for users.
Is there any way to customize or intercept the resolution of markers location? Or said differently, is there any way to force validation markers to only appear on nodes?
I took a look at the odesign options. I also digged into the code (the wrong location is found in the ValidateAction class). I also noticed we can write our own handler for org.eclipse.sirius.diagram.ui.command.validateDiagram. But that would be a crazy job... Any help would be appreciated.
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03698 seconds