Community
Participate
Working Groups
PRODUCT: Eclipse Project SDK Version: 1 Build: .137 OPERATING SYSTEM: OS: NT FixPak Level: 6 ABSTRACT: Search reference works only in outline view and not in editor. DESCRIPTION OF PROBLEM: Create java class named Class1 with the following code: package test; public class Class1 { public static void hello(String arg) { } } Create java class named Class2 with the following code: package jane.javapackage1; public class Class2 { public static void main (String[] arg) { Class1 c = new Class1(); // TYPE LINE HERE c.hello("a"); System.out.println ("Hello"); } } Go to the editor of Class1. In the outline view, you will see hello() method. Select the hello() method in the outline view and right click --> Search --> References In the bottom pane (Search view), you will see 1 instance. Clear the search view. Go to Class1 again, this time, highlight the word "hello" in the source and then right click --> Search --> References. Nothing happens.
This is a known defect in 1.0, it is due to the fact that in order to locate the selected element, search triggers an open-on-selection action which didn't work on declarations (only worked on references) back in 1.0. This got resolved in 2.0. We do not plan to backport it into 1.0 since it is too big of a change.
Closing