Community
Participate
Working Groups
Build Identifier: M20100211-1343 When you have a method available for Content Assist Favourites (where a static import should be added automatically), it is added correctly during code-completion, but is not available as a quickfix action, nor is it added by organise imports. Quickfix seems like an obvious places to have the addition of the import; if, for example, I happen to type the whole method name without having to ctrl+space I have no way to fix it without erasing some of the method and ctrl+space completing it. Organise imports more arguable. Does it (assuming standard naming conditions) violate the Organise Imports preference of "Do not create imports for types starting with a lowercase letter"? Reproducible: Always Steps to Reproduce: 1. Have a class set-up like the follwing. They can all be in one file: package one; public class A { public static void quux() { } } class B { void bar() { quux(); }} 2. Add one.A.*; as a Content Assist Favorite. 3. Observe the call to "quux" being in error. 4. Ctrl+shift+o Organie Imports. Nothing happens. 5. Quickfix "quux"' error. Only option is to "create method quux()". 6. Place the cursor after the "x" in "quux". 7. Hit ctrl+space code completion. 8. Code now reads "quux()()", but has successfully added the import.
This is bug 181788 and bug 283287. *** This bug has been marked as a duplicate of bug 181788 ***