Bug 85464

Summary: [assist] Better support for inner classes in Java editor.
Product: [Eclipse Project] JDT Reporter: Eugene Kuleshov <ekuleshov>
Component: CoreAssignee: David Audel <david_audel>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: martinae
Version: 3.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Eugene Kuleshov CLA 2005-02-16 12:07:34 EST
When working with inner classes, such as Java.CompilationUnit, Eclipse can't
resolve inner classes in code completion (Ctrl-space), so you have to type
parent class name first. Then if you will complete right hand condition like 

Java.CompilationUnit cu = new <Ctrl-Space>

Eclipse offers CompilationUnit name and automatically creates import for
Java.CompilationUnit, so the result will be:

  import Java.CompilationUnit;
  ...
  Java.CompilationUnit cu = new CompilationUnit();

It takes a lot of efford to keep code consistent. In some coding standards you
may not allowed to import inner classes, but should always explicitly specify
parent class. Currently Eclipse can't handle this very well.

Please investigate this and improve support for inner classes. Probably new
option should be introduced that will trigger prefixing with parent class name.
Comment 1 Martin Aeschlimann CLA 2005-02-16 12:24:30 EST
There's an bug for the missing proposals for inner types: bug 72460

Note to jdt.core:
We are thinking of introducing a code style preference where you could say that
you prefer type-qualified names for inner classes (e.g. Outer.Inner)
In this case (code assist for 'new') it is probably the best to offer both.
And please finally fix bug 72460!
Comment 2 David Audel CLA 2005-06-10 04:57:57 EDT

*** This bug has been marked as a duplicate of 94965 ***