Bug 227121 - [Markers] Enhanced IMarker navigation
Summary: [Markers] Enhanced IMarker navigation
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: IDE (show other bugs)
Version: 3.3.1   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-15 09:18 EDT by Eric Wittmann CLA
Modified: 2019-09-06 16:08 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Wittmann CLA 2008-04-15 09:18:10 EDT
Scenario:

Need to implement a "Find References" feature for web service constructs (WSDL messages, port types, operations, schema Elements, types, etc...).  We have an XML index that lets us efficiently search within all resources in the workspace. The problem is that the index does not contain line and column information.  What we *can* easily produce from the XML index is an xpath to the element or attribute.

To implement this search feature, I would like to create custom Eclipse search markers (have my own marker subtype) that contains the xpath *instead* of line and column information.  I would then want to resolve the xpath into a line number when the user double-clicks on the maker in the Search view.  This way, the expensive part of the search for us (resolving xpaths to locations within a file) can be deferred.  The search will be fast, and the time to resolve the line information (which requires a Sax parse of the file) will be deferred until the double-click.  This also (likely ) effectively reduces the total amount of work done, unless the user double-clicks on every single result in the search.

Suggested implementation(s):

It seems to me that the IGotoMarker interface could be contributed via an extension point.  I could associate an IGotoMarker implementation with my custom search marker type.  The IDE.gotoMarker() method would first lookup any contributed implementations before checking the editor.

Alternatively, some new interface could be introduced which could serve as a marker pre-processor.  This would give me the opportunity to augment the marker meta data with line and column number information.  For my use case, it would be something like IMarkerLocationResolver.

It seems like other projects may have similar issues.  Isn't there an EMF index project out there that allows searching across EMF models?  I imagine they will face a similar issue once they start doing this sort of "find" searching unless the EMF index contains line and column information.

Current Work Around:

For search hits that fall within a BPEL file (for which we have our own editor) I simply add the xpath to the marker and the BPEL editor's IGotoMarker implementation knows how to navigate to the right place.  For all other search hits, I do the Sax parse to resolve the line information during the search.  This slows down the search, but it's still better than not having the index at all.  Still, we spend far more time parsing XML than searching for the right results in the index.
Comment 1 Susan McCourt CLA 2009-07-15 12:18:13 EDT
"As per http://wiki.eclipse.org/Platform_UI/Bug_Triage_Change_2009"
Comment 2 Eclipse Webmaster CLA 2019-09-06 16:08:33 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.