Summary: | Cannot quick fix annotation member types | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Xibin Zeng <xzeng> |
Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> |
Status: | RESOLVED INVALID | QA Contact: | |
Severity: | major | ||
Priority: | P3 | CC: | jgarms, xzeng |
Version: | 3.2 | Keywords: | needinfo |
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | Windows XP | ||
Whiteboard: | |||
Bug Depends on: | 133491 | ||
Bug Blocks: |
Description
Xibin Zeng
2006-03-16 12:38:05 EST
Not APT-specific, but rather a UI issue: quick-fix needs to be able to import the class NeedsImportEnum. I tried to reproduce, but this works for me: Quick fix on the error suggests to import NeedsImportEnum. Maybe you have NeedsImportEnum in the default package? Maybe you can add a reproducable example. ----- package pack; public class A { @MyAnnotation(field=NeedsImportEnum.HELLO) public void hello() { } } ----- package pack; public @interface MyAnnotation { String field(); } ------ package pack.other; public enum NeedsImportEnum { HELLO; } Thanks for trying to repro the problem. I realized that my case had a bit of twist... I modified your repro a little, see below: ----- package pack; public class A { @MyAnnotation(NeedsImportEnum.HELLO) public void hello() { } } ----- package pack; public @interface MyAnnotation { NeedsImportEnum value(); boolean value2() default false; } ------ package pack; public enum NeedsImportEnum { HELLO; } Adjustment for repro: ----- package other; public class A { @MyAnnotation(NeedsImportEnum.HELLO) public void hello() { } } Quick fix uses the code assist infrastructure to evaluate the type. I file bug 133491 as code assist is missing here. As of now 'LATER' and 'REMIND' resolutions are no longer supported. Please reopen this bug if it is still valid for you. |