Community
Participate
Working Groups
The addMarkers(..) method in the CheckProblemMarkerService class is responsible for creating a Marker in the "Check Validation Problem Marker View". For that, createMarker() wants to have an (IResource file) as one parameter to enable proper navigation to the error itself. I found one case where it fails. My use case is to have a model which is distributed over several xmi resources Now, the content of file points always to the resource where the user has performed his right click in order to run validation tasks. This means, in the case that a model object of an other resource would have an error the entry in the view would always try to open the resource from the current model object which is passed as a parameter to the check method.
Instead of following instruction (in class CheckProblemMarkerService) for retrieving the resource: - IResource file = EcorePlatformUtil.getFile(resource); I would recommend to do something like - Get affectedObject from child Diagnostic object - IResource childObjectFile = EcorePlatformUtil.getFile(affectedObject.eResource()); to solve this issue.
Created attachment 267479 [details] patch to enable navigation from error marker to affected EObject when using multiple resources As Gerrit does not seem to be configured for contribution and as discussed in December we would like to provide this (and in future also further) patches to improve/enrich functionality w.r.t. check-based validations used within App4mc.
Closed stale issue before migration