Bug 9223

Summary: CodeAssist failure in inner type from class file.
Product: [Eclipse Project] JDT Reporter: John Wiegand <John_Wiegand>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P1    
Version: 2.0   
Target Milestone: 2.0 M3   
Hardware: PC   
OS: Windows 2000   
Whiteboard:
Attachments:
Description Flags
zzz.jar (jar with MyClass.class and MyClass$Inner.class)
none
zzzsrc.jar (jar with MyClass.java) none

Description John Wiegand CLA 2002-02-06 19:53:36 EST
0205

1. Create a project with using an external jar and attached source 
corresponding to the class below.
2. In the package view, expand to Inner.class.
3. Select the method invocation test() in callsTest.
4. Press F3.
This fails with a beep.

NOTE: The same test succeeds if MyClass.class is selected instead.

I was confused because I was scrolling around and did not realize that
I had an inner class selected (it was used because I had done an earlier
search).  

public class MyClass {
	
	class Inner {
		public void junk() { }
	}
	
	public void test() { }
	
	public void callsTest() {
		test();
	}

}
Comment 1 Erich Gamma CLA 2002-02-07 16:39:06 EST
Moving to Core for investigation.
Comment 2 Philipe Mulet CLA 2002-02-07 18:17:53 EST
Is Inner.class a classfile in the output folder ? These are not true Java 
elements (not defined under a package fragment root).
Comment 3 John Wiegand CLA 2002-02-07 18:41:25 EST
I am not looking in the output folder - the classes are in
a jar.

MyClass$Inner.class is showing up in the packages view.

I will attach the jar and the source.
Comment 4 John Wiegand CLA 2002-02-07 18:47:06 EST
Created attachment 332 [details]
zzz.jar (jar with MyClass.class and MyClass$Inner.class)
Comment 5 John Wiegand CLA 2002-02-07 18:47:37 EST
Created attachment 333 [details]
zzzsrc.jar (jar with MyClass.java)
Comment 6 David Audel CLA 2002-02-11 05:59:16 EST
If code select from class file, the BasicCompilationUnit must be the main type.

Fixed