cornercorner
FeaturesPluginsDocs & SupportCommunityPartners

Bug 71249 - Fix Imports does not offer to create static imports
: Fix Imports does not offer to create static imports
Status: NEW
: java
Editor
: 6.0
: All All
: P3 (vote)
: 6.9
Assigned To:
:
:
:
:
: 89258
:
  Show dependency treegraph
 
Reported: 2006-01-10 20:12 by
Modified: 2009-12-09 12:54 (History)
Issue Type: ENHANCEMENT
:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2006-01-10 20:12:08
@Retention(RUNTIME)
@Target({FIELD})
public @interface X {}

Fix Imports will offer to import Retention and Target, but not (static import)
ElementType.FIELD and RetentionPolicy.RUNTIME.
------- Comment #1 From 2006-01-10 20:12:22 -------
Ditto for editor hints, BTW.
------- Comment #2 From 2006-10-26 10:40:23 -------
Reassigning to Honza.
------- Comment #3 From 2006-12-14 08:24:53 -------
Sorry, but I do not think this is a defect - this is not supposed to work for
now.
------- Comment #4 From 2008-08-19 10:08:20 -------
*** Issue 144254 has been marked as a duplicate of this issue. ***
------- Comment #5 From 2009-09-15 10:14:55 -------
*** Issue 172243 has been marked as a duplicate of this issue. ***
------- Comment #6 From 2009-12-04 05:35:10 -------
*** Bug 164490 has been marked as a duplicate of this bug. ***
------- Comment #7 From 2009-12-05 05:19:02 -------
Pulling in clarifying comments from dupes.

Note that this is related to issue 164487. Instead of scanning the entire
classpath, the user provides the list of classes to scan. There could be a lot
of noise without user preference.

(copied from gsporar in issue 89258)

If I type this in:

    int val = abs(55);

I get an error and an editor hint that offers to create a method called abs().

I would like to also get an editor hint that offers to do a static import of
java.lang.Math.abs (and perhaps another hint for a static import of
java.lang.Math.*).