Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 335029

Summary: [code assist] no import for inner non-public interface
Product: [Eclipse Project] JDT Reporter: Daniele Pirola <daniele.pirola>
Component: CoreAssignee: Ayushman Jain <amj87.iitr>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: akargapolov, Olivier_Thomann
Version: 3.7   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug
Attachments:
Description Flags
Test case in a zip file none

Description Daniele Pirola CLA 2011-01-21 11:06:27 EST
Build Identifier: Build id: M20100909-0800

Suppose to have an interface like this
public interface A {
    interface B extends A {  // inner
    }
}

If in another java file you type

public class C {
...
B field;
...
}

and want to organize import automatically Eclipse doesn't fill the import and no suggestion are shown

If the inner interface B instead is marked with "public" modifier
e.g 
public interface A {
    public interface B extends A {
    }
}

Eclipse work correctly



Reproducible: Always
Comment 1 Olivier Thomann CLA 2011-01-24 11:47:54 EST
Ayushman, please investigate.
interfaces members (fields, methods or nested types) should be implicitly public. So adding public should not change anything.
Comment 2 Olivier Thomann CLA 2011-01-24 11:48:26 EST
Code assist also doesn't propose any possible completion for 'B'.
Comment 3 Olivier Thomann CLA 2011-01-24 11:49:45 EST
Of course, this is only an issue if A and C are not in the same package.
Comment 4 Olivier Thomann CLA 2011-01-24 11:56:30 EST
Created attachment 187447 [details]
Test case in a zip file
Comment 5 Daniele Pirola CLA 2013-10-01 04:13:18 EDT
news?
Comment 6 Eclipse Genie CLA 2020-05-22 13:18:52 EDT
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.

If you have further information on the current state of the bug, please add it. 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.
Comment 7 Eclipse Genie CLA 2022-05-13 10:37:33 EDT
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.

If you have further information on the current state of the bug, please add it. 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.