Bug 9504 - 1GRU1L3:Search reference works only in outline view and not in editor
Summary: 1GRU1L3:Search reference works only in outline view and not in editor
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 1.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.0 M3   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-02-12 19:01 EST by OTI Support CLA
Modified: 2002-02-14 09:24 EST (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 OTI Support CLA 2002-02-12 19:01:59 EST
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.
Comment 1 Philipe Mulet CLA 2002-02-12 19:07:24 EST
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.
Comment 2 Philipe Mulet CLA 2002-02-13 06:09:58 EST
Closing