Bug 482078

Summary: Unable to navigate from Problem Marker View to corresponding model element having a model which is distributed over multiple resources
Product: [Automotive] Sphinx Reporter: Francesco Gerardi <Francesco.Gerardi>
Component: Validation Runtime ExtensionsAssignee: Project Inbox <sphinx-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: balazs.grill, Francesco.Gerardi, stephaneberle9
Version: 0.9.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
patch to enable navigation from error marker to affected EObject when using multiple resources none

Description Francesco Gerardi CLA 2015-11-13 03:25:56 EST
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.
Comment 1 Francesco Gerardi CLA 2015-11-13 03:57:36 EST
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.
Comment 2 Francesco Gerardi CLA 2017-03-27 09:20:27 EDT
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.
Comment 3 Balazs Grill CLA 2024-05-06 23:26:35 EDT
Closed stale issue before migration