I would like to implement validation synchronization between ProblemsView and my editor. Double-click in ProblemsView should open diagram and highlight problem !
But, the DiagramEditorBehavior deletes Problem Markers when opening the diagram.
Michael Wenz Messages: 1268 Registered: July 2009 Location: Walldorf, Germany
Senior Member
The diagram editor uses the emf MarkerHelper for managing the associated
problem markers. On startup of the editor, all markers are refreshed
(cleaned and craeted anew).
How do you create the markers? The Graphiti tutorial has a section on
markers, did you have a look into that?
For tutorial, are you refering to "Rendering Decorators" section ?
I create my markers in a "ValidateFeature" (extending CustomFeature) using EMF Validation and EMF helper like that :
IStatus status = validator.validate(domainObject);
BasicDiagnostic d = new BasicDiagnostic(status.getPlugin(), status.getSeverity(), status.getMessage(), new Object[] {domainObject});
EditUIMarkerHelper h = new EditUIMarkerHelper();
h.createMarkers(d);
The markers appears in ProblemsView properly.
In DiagramEditorBehavior.updateProblemIndication(), only errors and warnings from Resource are recreated and not from IResource. But EMF Validation doesn't populate Resource errors and warnings !
Am I missing something that should make me feel ashamed ?
Michael Wenz Messages: 1268 Registered: July 2009 Location: Walldorf, Germany
Senior Member
Sorry, it took me some time to get back to this...
You're right, this doesn't seem to fit together. I'm not sure how to solve
that right now, this really needs a closer look. Would you please file a
bugzilla for this problem?