Bug 482078 - Unable to navigate from Problem Marker View to corresponding model element having a model which is distributed over multiple resources
Summary: Unable to navigate from Problem Marker View to corresponding model element ha...
Status: CLOSED WONTFIX
Alias: None
Product: Sphinx
Classification: Automotive
Component: Validation Runtime Extensions (show other bugs)
Version: 0.9.1   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-13 03:25 EST by Francesco Gerardi CLA
Modified: 2024-05-06 23:26 EDT (History)
3 users (show)

See Also:


Attachments
patch to enable navigation from error marker to affected EObject when using multiple resources (2.06 KB, patch)
2017-03-27 09:20 EDT, Francesco Gerardi CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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