Bug 52422 - F3 can't find method def'n inside inner (anonymous) class
Summary: F3 can't find method def'n inside inner (anonymous) class
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0 M9   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-18 15:51 EST by Debbie Wilson CLA
Modified: 2004-05-18 11:31 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Debbie Wilson CLA 2004-02-18 15:51:45 EST
I20040218
- class PerspectiveRegistry (org.eclipse.ui.workbench/Eclipse 
UI/org.eclipse.ui.internal.registry/PerspectiveRegistry)

I have the project org.eclipse.ui.workbench loaded as source in my 
environment.  Open the class PerspectiveRegistry in the editor.  The 
constructor has the following format:

public PerspectiveRegistry() {
  super();

  IPreferenceStore store = WorkbenchPlugin.getDefault().getPreferenceStore();
  store.addPropertyChangeListener(new IPropertyChangeListener() {
    public void propertyChange(PropertyChangeEvent event) {
      ...
    }

    private void mergePerspectives(PropertyChangeEvent event) {
      ...
      updatePreferenceList(store);
    }

    private void updatePreferenceList(IPreferenceStore store) {
      ...
    }
  });
}

Double click to select the text 'updatePreferenceList' where it is called in 
method mergePerspectives.  Hit F3.  I expected to go to the definition of the 
method updatePreferenceList a couple of lines below.  But instead I got the 
error message "Current text selection doesn't resolve to a Java element".
Comment 1 Martin Aeschlimann CLA 2004-02-20 10:31:44 EST
reproduced this. Set a breakpoint in ICompilationUnit.codeSelect and no result
was returned.
Comment 2 David Audel CLA 2004-05-11 07:30:33 EDT
Simple test case

public class X {
  public void foo() {
    new Object() {
      void bar1() {
        bar2();
      }
      void bar2() {
      }
    };
  }
}
Comment 3 David Audel CLA 2004-05-17 10:48:11 EDT
Fixed and test added
  SelectionTest#test50()
  SelectionTest#test51()
  SelectionTest#test52()
Comment 4 Olivier Thomann CLA 2004-05-18 11:31:53 EDT
Verified in 200405180816