Bug 9223 - CodeAssist failure in inner type from class file.
Summary: CodeAssist failure in inner type from class file.
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P1 normal (vote)
Target Milestone: 2.0 M3   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-02-06 19:53 EST by John Wiegand CLA
Modified: 2002-02-11 05:59 EST (History)
0 users

See Also:


Attachments
zzz.jar (jar with MyClass.class and MyClass$Inner.class) (1.23 KB, application/octet-stream)
2002-02-07 18:47 EST, John Wiegand CLA
no flags Details
zzzsrc.jar (jar with MyClass.java) (557 bytes, application/octet-stream)
2002-02-07 18:47 EST, John Wiegand CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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