Bug 6127 - Reference by local class not found when searching for interface refs
Summary: Reference by local class not found when searching for interface refs
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.0 M1   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-11-20 14:00 EST by Nick Edgar CLA
Modified: 2002-01-11 09:22 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Edgar CLA 2001-11-20 14:00:14 EST
Build 20011116.

In some code I'm reviewing, there is an interface FileTool.IZipFilter 
(IZipFilter is a member type of the class FileTool).

I selected IZipFilter in the packages view and chose References / Workspace.
It did not find the following reference, which is in a private method of a 
class in another package.

    FileTool.IZipFilter filter = new FileTool.IZipFilter() {
      public boolean extract(String fullEntryName, String entryName, int depth) 
{
        return true;
}
      public boolean unzip(String fullEntryName, String entryName, int depth) {
        return false;
      }
    };
Comment 1 Erich Gamma CLA 2001-11-20 16:50:51 EST
Search should now find references in anonymous inner classes.
Moving to Java Core
Comment 2 Jerome Lanneluc CLA 2001-11-23 12:12:23 EST
I created the 2 following compilation units (in packages a and b):
// First cu
package a;
public class FileTool {
	public interface IZipFilter {
      public boolean extract(String fullEntryName, String entryName, int 
depth); 
      public boolean unzip(String fullEntryName, String entryName, int depth);
	}
}

// Second cu
package b;
import a.*;

public class Test {
	private void foo() {
	    FileTool.IZipFilter filter = new FileTool.IZipFilter() {
			public boolean extract(String fullEntryName, String 
entryName, int depth) {
		        return true;
			}
			public boolean unzip(String fullEntryName, String 
entryName, int depth) {
		        return false;
	      	}
	    };
	}
}

When I select IZipFilter in the package view and search for references in the 
workspace, I find 2 references.

Do you have a test case that shows the problems?
Comment 3 Nick Edgar CLA 2001-11-23 12:35:07 EST
Could not reproduce in build 20011122.
Comment 4 Jerome Lanneluc CLA 2001-11-23 12:56:35 EST
Closing