You need to log in before you can comment on or make changes to this bug.
@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.
Ditto for editor hints, BTW.
Reassigning to Honza.
Sorry, but I do not think this is a defect - this is not supposed to work for now.
*** Issue 144254 has been marked as a duplicate of this issue. ***
*** Issue 172243 has been marked as a duplicate of this issue. ***
*** Bug 164490 has been marked as a duplicate of this bug. ***
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.*).