Community
Participate
Working Groups
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.
sounds similar to bug 3447
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...
Closing.
*** Bug 16176 has been marked as a duplicate of this bug. ***
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.