Bug 167520 - [quick fix] Provide quick fixes for annotations with invalid target
Summary: [quick fix] Provide quick fixes for annotations with invalid target
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-11 20:37 EST by Brock Janiczak CLA
Modified: 2009-01-23 11:35 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brock Janiczak CLA 2006-12-11 20:37:38 EST
Version: 3.3.0
Build id: I20061102-1715

There is a compile error in the given snippet on the @Override annotation, but no quick fix for it.

@Override
public class Foo {}

It would be nice if there were at least a quick fix to remove the annotation.  Another fix might be to add the target type to the @interface definition.  ie. change it to:

@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.SOURCE)
public @interface Override {
}