Bug 167176

Summary: ResourceException after double click on result in Search view
Product: [Modeling] GMF-Runtime Reporter: Alex Boyko <aboyko>
Component: GeneralAssignee: Alex Boyko <aboyko>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ahunter.eclipse
Version: 2.0Keywords: contributed
Target Milestone: 1.0.3   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
proposed patch none

Description Alex Boyko CLA 2006-12-07 17:36:27 EST
Build ID: 3.2.1

Steps To Reproduce:
1. Create new Logic diagram
2. Select logic diagram resource in Package or Project Explorer
3. In the top level menu go to Search->Text->Worksapce
4. In the search view click on the result corresponding to your logic diagram resource file

Problem: there are exceptions logged in the errors view for a not found marker.

Expected: no exceptions logged


More information:
GMF's MarkerNavigationService performs navigation to the marker as an async display message, while Eclipse's FileSearchPage expect this to run sequentially. Eclipse's FileSearchPage does the following:
1) creates marker
2) navigates to marker
3) deletes the marker

Since navigation is performed in an async message the marker is removed from the MarkersSet before navigation is performed.

There are 2 ways to fix this:
1) Navigate to marker sequentially
2) Check if the marker exists in the workspace before navigating to it. In this case navigation to the found text won't be avilable for diagram editors (which currently makes sense)
Comment 1 Alex Boyko CLA 2006-12-08 11:42:39 EST
Created attachment 55321 [details]
proposed patch

Regarding 2 ways to fix the issue:
the patch includes both ways:
1) Doesn't seem like navigation should be done as an async display message, any longer at least (Christian Damus agrees).
2) Before navigating to marker it should always be checked for existence - this just a good practice and, hence, wouldn't hurt to have this check.
Comment 2 Alex Boyko CLA 2006-12-18 10:28:43 EST
Patch has been committed. Marking as fixed
Comment 3 Eclipse Webmaster CLA 2010-07-19 12:28:37 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Runtime Diagram was the original product and component for this bug