Bug 286014 - [search] "References in workspace" should indicate Javadoc matches in search result label
Summary: [search] "References in workspace" should indicate Javadoc matches in search ...
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P5 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-07 12:09 EDT by Daniel CLA
Modified: 2009-08-10 09:25 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 Daniel CLA 2009-08-07 12:09:18 EDT
Build ID: 20090621-0832

Steps To Reproduce:
See the sample code below.  Doing a "References in workspace" on f2() results in 1 hit -- the Javadoc comment above f1().  The problem is that the search pane gives no indication that the hit was in Javadoc and not a real reference to f2().

I would be happy with either of the following enhancements (preferably both):

1) An option to turn off searching in Javadoc "@see" tags for function references
2) Some sort of visual indicator in the search pane that indicates if a reference was found in Javadoc as opposed to source code

More information:
public class TestClass {
    /**
     * @see #f2()
     */
    public void f1() {
    }
    
    public void f2() {
    }
}
Comment 1 Markus Keller CLA 2009-08-10 09:21:31 EDT
> 1) An option to turn off searching in Javadoc "@see" tags for function
> references

You can either filter Javadoc matches via the Search view menu (select filter "In Javadoc"), or turn off Javadoc support completely on the Java > Compiler > Javadoc preference page.

> 2) Some sort of visual indicator in the search pane that indicates if a
> reference was found in Javadoc as opposed to source code

Keeping this bug as an enhancement request for this. We should probably also mark matches in imports similarly. A problem to keep in mind is that the search result view only goes down to the member level, and if there are two or more matches in the same member, this more complicated to render, e.g.:

    /**
     * @see #f2()
     */
    public void f1() {
    	f2();
    }

    public void f2() {
    }
Comment 2 Daniel CLA 2009-08-10 09:25:58 EDT
> A problem to keep in mind is that the search result view only goes down to the member level

That's another thing that would be nice to enhance.  Maybe you should be able to expand the member level and have it show the actual locations where the search results are, similar to what's done in the Compare view.