Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 313824 - [organize imports][quick fix] CA Favorites suggestions should be available via. quickfix and Organise Imports(?)
Summary: [organize imports][quick fix] CA Favorites suggestions should be available vi...
Status: CLOSED DUPLICATE of bug 181788
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-20 18:35 EDT by Chris West (Faux) CLA
Modified: 2010-05-21 02:30 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris West (Faux) CLA 2010-05-20 18:35:29 EDT
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.
Comment 1 Dani Megert CLA 2010-05-21 02:30:50 EDT
This is bug 181788 and bug 283287.

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