Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 336390 - Wrong quick fix on nested class not being visible
Summary: Wrong quick fix on nested class not being visible
Status: CLOSED DUPLICATE of bug 94755
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows XP
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-04 14:41 EST by Sebastian Dietrich CLA
Modified: 2012-11-21 15:16 EST (History)
3 users (show)

See Also:


Attachments
Example Code (2.93 KB, application/x-zip-compressed)
2012-11-20 16:52 EST, Sebastian Dietrich CLA
no flags Details

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