Bug 85464 - [assist] Better support for inner classes in Java editor.
Summary: [assist] Better support for inner classes in Java editor.
Status: RESOLVED DUPLICATE of bug 94965
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-16 12:07 EST by Eugene Kuleshov CLA
Modified: 2005-06-10 04:57 EDT (History)
1 user (show)

See Also:


Attachments

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