Bug 56357 - Code completion should show nested classes
Summary: Code completion should show nested classes
Status: RESOLVED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 enhancement (vote)
Target Milestone: 3.0 M9   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-26 10:40 EST by Brad Clarke CLA
Modified: 2004-05-19 12:33 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brad Clarke CLA 2004-03-26 10:40:24 EST
Using 3.0 M7, been like this since I started using Eclipse with 2.1

Create this class:
public class Parent {
    public static class Nested {
    }
}

Then create this class and attempt code completion (Ctrl-Space) the listed location:
public class OtherClass {
    public OtherClass() {
        Nes<Code Complete Here>
    }
}

The Nested class does not show up in the completion list. If you create a method
in the Parent class and attempt code completion the Nested class does show in
the list.
Comment 1 Kent Johnson CLA 2004-04-26 14:35:52 EDT
That's because the type Parent.Nested is not visible unless you qualify it. 
The member type cannot be found by its simple name.

Try:
public class OtherClass {
    public OtherClass() {
        Parent.Nes<Code Complete Here>
    }
}
Comment 2 Brad Clarke CLA 2004-04-27 10:16:30 EDT
that's not the point :)

make it a new feature if you must but this is how I would like to see it work
Comment 3 Philipe Mulet CLA 2004-04-28 06:15:40 EDT
How can we guess you want the Nested in Parent, and not any arbitrary member 
types nested anywhere ? What about offering all static members of the entire 
libraries following this approach ?

We want codeassist to remain predictible and simple. If it offers 10.000 
completions, it is as good as offering none (except much slower).

I don't think we want to follow that path.