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

Bug 336390

Summary: Wrong quick fix on nested class not being visible
Product: [Eclipse Project] JDT Reporter: Sebastian Dietrich <Sebastian.Dietrich>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: deepakazad, Olivier_Thomann, rgransberger
Version: 3.7   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Example Code none

Description Sebastian Dietrich CLA 2011-02-04 14:41:49 EST
Build Identifier: 20100917-0705

I have a private static nested class "Inner" inside of an outer class "Outer". The nested class has a public method "myMethod".

If I want to call that method from another class I get the correct error "The type Outer.Inner is not visible"
Nevertheless the quick fix suggests "change visibility of 'myMethod' to 'public'" which does not help since it is already public. Instead the quick fix should be "change visibility of 'Outer.Inner' to 'public'"

Reproducible: Always
Comment 1 Olivier Thomann CLA 2011-02-04 14:44:14 EST
Move to JDT/UI
Comment 2 rgra Missing name CLA 2012-11-20 12:11:36 EST
Hi Sebastian,

can you please provide a code example and verify if this still happens in the current eclipse 4.3 or 3.8?

I tried to produce an example, but this gave my different Quick-Fix options.
Comment 3 Sebastian Dietrich CLA 2012-11-20 16:52:45 EST
Created attachment 223775 [details]
Example Code

Still happens in latest eclipse (Juno SR 1 20121004-1855)
See attached example
Comment 4 rgra Missing name CLA 2012-11-21 14:48:38 EST
This is the same as 94755. Please mark as duplicate. It is fixed by 394692.
Comment 5 Deepak Azad CLA 2012-11-21 15:16:16 EST
Thanks Rabea.

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