Bug 318673

Summary: [search] See line with source code in References > Workspace search result
Product: [Eclipse Project] JDT Reporter: Lars Svensson <oxvalley>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: ASSIGNED --- QA Contact:
Severity: enhancement    
Priority: P5 CC: daniel_megert, deepakazad, jhigdon, markus.kell.r
Version: 3.7   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Lars Svensson CLA 2010-07-02 04:36:25 EDT
Build Identifier: 

When I mark a class or method or field and right-click and selects References-> Workspace, I get a list of files where this unit is used. It also says like "(2 matches)". 

I would like these search result to be shown as Ctrl-H searches does. Each hit is shown by that line of code is shown, and would make it much easier for me to select the right hit.

Reproducible: Always
Comment 1 Markus Keller CLA 2010-07-05 13:14:53 EDT
Inside a single file, you can get this with Search > Occurrences in File. For method references, you could also use the Call Hierarchy and its location pane.
Comment 2 Lars Svensson CLA 2010-07-06 04:27:47 EDT
Yes, Markus. I can find three different ways of showing search results in Eclipse:

1) Ctrl-H search that shows each line within the search tree

2) References->Workspace, that just tells you like (3 matches) in the tree, and you have to use Up and Down arrows to go between them.

3) Call Hierachy that has a tree with (3 matches) like number 2), but uses a location Pane to show the lines.

Wouldn't it be good to have ONE common way to show the result. In my (humble) oppionen number 1) that shows each line within the search result tree is much easier to overview.
Comment 3 Deepak Azad CLA 2010-07-06 07:34:53 EDT
(In reply to comment #2)
> Wouldn't it be good to have ONE common way to show the result. In my (humble)
> oppionen number 1) that shows each line within the search result tree is much
> easier to overview.
I also like the how Ctrl+H results are shown and we should do the same at least for 'References->Workspace'. 

I think the UI might get complicated if the same is done for Call Hierarchy - though I have to admit I miss seeing the locations pane quite often and not having a separate locations pane would be nice.
Comment 4 Jonathan Higdon CLA 2013-02-16 14:38:11 EST
Seems in cdt for references-> workspace you get line number and source; any plans we'll see this in jdt?
Comment 5 Dani Megert CLA 2013-02-18 03:25:18 EST
(In reply to comment #4)
> Seems in cdt for references-> workspace you get line number and source; any
> plans we'll see this in jdt?

No, no plans at the moment.