This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 245087 - Fix Imports: specific case where the function fails to use type info to automatically fix
Summary: Fix Imports: specific case where the function fails to use type info to autom...
Status: RESOLVED DUPLICATE of bug 49573
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.0
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-16 13:27 UTC by terje7601
Modified: 2014-06-16 14:44 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description terje7601 2014-06-16 13:27:50 UTC
If I do "Fix Imports" on the annotation below (where TYPE in @Target(TYPE) is unresolved), it should imho automatically deduce that java.lang.annotation.ElementType.TYPE is the only sensible import. However, it opens a dialog and selects "java.lang.Integer.TYPE" by default.



import java.lang.annotation.Documented;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Target;

@Inherited
@Target(TYPE)
@Retention(RUNTIME)
@Documented
public @interface Function {

	String value();

}
Comment 1 Jiri Prox 2014-06-16 14:44:31 UTC

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