Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 362381 - Auto-complete does not support type-qualification of interfaces declared within classes.
Summary: Auto-complete does not support type-qualification of interfaces declared with...
Status: CLOSED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-28 22:15 EDT by Byron Hawkins CLA
Modified: 2020-01-20 20:13 EST (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 Byron Hawkins CLA 2011-10-28 22:15:11 EDT
Build Identifier: 20110916-0149

It is often syntactically meaningful to declare an interface as a nested type of a class, particularly when it is a very simple interface and the type-qualified shares meaning with the class name of the enclosing class. For example, when an interface Listener is declared within a class Controller, references to the Listener interface may conveniently be spelled as Controller.Listener. This is very readable, and allows one less class file to clutter the project. However, content assist will not auto-complete the enclosing class when the caret is in a position at which only an interface is allowed. So if I attempt to implement this interface by typing:

    "public class ChangeListener implements Con^"

where ^ is the content-assist trigger, it will not offer "Controller". My plan is to type "Controller.Listener", and I would hope for keystrokes "Con^.Lis^" to get me there, but it is not possible. There is a setting in Content Assist Preferences "Hide proposals not visible in the invocation context," but unchecking it does not cause this behavior to change. Can there be an option to accommodate type-qualified names? 

Reproducible: Always

Steps to Reproduce:
1. Declare interface Listener in class Controller.
2. In a separate Java source, begin to implement Controller.Listener
3. When entering the token "Controller", request content assist after the first 3 characters. 

The type Controller is not offered, because JDT believes that only interface types are valid in that location. This is in fact false, all type tokens are valid in that location, because of the possibility of type qualification.
Comment 1 Eclipse Genie CLA 2020-01-20 20:13:04 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.