Bug 167176 - ResourceException after double click on result in Search view
Summary: ResourceException after double click on result in Search view
Status: RESOLVED FIXED
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: General (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P3 normal
Target Milestone: 1.0.3   Edit
Assignee: Alex Boyko CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2006-12-07 17:36 EST by Alex Boyko CLA
Modified: 2010-07-19 12:28 EDT (History)
1 user (show)

See Also:


Attachments
proposed patch (1.91 KB, patch)
2006-12-08 11:42 EST, Alex Boyko CLA
no flags Details | Diff

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