Community
Participate
Working Groups
Build Identifier: 20100617-1415 package somepack; public class Outer<T extends StaticInner> { public static class StaticInner { } } With such code, eclipse will notify you about an error: "StaticInner cannot be resolved to a type". The first proposed quick-fix is "Import 'StaticInner' (somepack.Outer)", however, it does not add the missing import in this situation. The workaround is to manually add the missing import. HOWEVER, if you (both directly and indirectly) use the "Organize Imports" feature, the needed import(s) will be removed. Reproducible: Always Steps to Reproduce: 1. Save the given code as a class. 2. Try to compile, get the error. 3. Try to use quick fix. (OPTIONAL:) 4. Add the missing import manually. 5. Use "Organize Imports". (or "Save Actions"/"Clean Up"/"Formatter" with that feature enabled.
Using I20100824-1210, I can no longer reproduce. OrganizeImport preserves or add the missing import. Closing as WORKSFORME. Please reopen if this doesn't work for you.
With build I20100909-1700 I could verify that organize imports does not remove the import erroneously. I think this is due to the fix for bug 294057. However, I do see that the quick fix is ineffective as complained about in comment# 0. So reopening and passing it to JDT/UI for comment.
I don't think this has anything to do with code completion. I think the submitter meant to say quick fix instead, changing defect title suitably.
For wrong proposal of import quick fix see bug 272536.
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.
I don't understand why this has been marked as WONTFIX. The quick fix still doesn't do anything, and that seems like a bug that should be fixed.
I have a fix for this that I will post shortly
New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/186734
Gerrit change https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/186734 was merged to [master]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=0d4786ea7254bc4460f4749674988ae1c4c72854
Released for 4.22 M2
Verified for 4.22 M2 using I20211028-1800 build