Bug 21879 - Search could be optimized based on visibility
Summary: Search could be optimized based on visibility
Status: RESOLVED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 2.1 M1   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 16176 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-07-24 18:48 EDT by Peter Burka CLA
Modified: 2002-09-10 08:50 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Burka CLA 2002-07-24 18:48:20 EDT
When I search for references to a private method or field in the Workspace, 
the search doesn't seem to be any faster than a search for a public method or 
field.

Sometimes I search within the hierarchy instead of the workspace, as this 
operation is 2-3 times faster than a Workspace search. But it's not a useful, 
as it misses references in inner types.

I suspect that this search could be made faster by recognizing that the 
private field can only be referenced by the class itself, and its innner 
classes. Similar optimizations can be made for protected and default members.
Comment 1 Adam Kiezun CLA 2002-07-25 04:34:29 EDT
sounds similar to bug 3447
Comment 2 Philipe Mulet CLA 2002-07-25 05:49:20 EDT
Indeed. Currently, search is able to find appropriate matches in incorrect code 
as well, and this is a nice feature which we want to preserve.

Therefore, private methods may be referenced (incorrectly) from the outside, 
which means we have to look for them. 

If Java tooling only had to deal with correct code, things could be so much 
simpler...
Comment 3 Philipe Mulet CLA 2002-07-25 06:21:21 EDT
Closing.
Comment 4 Philipe Mulet CLA 2002-07-25 07:27:46 EDT
*** Bug 16176 has been marked as a duplicate of this bug. ***
Comment 5 Peter Burka CLA 2002-07-25 09:51:04 EDT
Could we search the current file and files with errors? (And probably files 
which haven't been built, too).

That would still narrow down the search significantly.