Skip to content

Make ValidationMarkerManager extensible

Bugzilla Link 573666
Status NEW
Importance P3 normal
Reported May 20, 2021 09:27 EDT
Modified May 07, 2024 00:58 EDT
Version 0.11.0

Description

There are use-cases that require customizing the validation marker management implementation.
An example could be handling of a diagnostic whose data needs to be further processed to reach the actual target EObject.
Check org.eclipse.sphinx.emf.validation.markers.ValidationMarkerManager.addMarkers(Resource, Diagnostic), line 176:

EObject tgtObject = (EObject) childDiagnostic.getData().get(0);

//retrieve the actual target element
EObject actualTargetObject = unwwap(tgtObject);

attributes.put(EValidator.URI_ATTRIBUTE, EcoreUtil.getURI(actualTargetObject ).toString());
(...)