| Summary: | [extract interface] Extract Interface option to ignore annotations | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Paul Benedict <pbenedict> |
| Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> |
| Status: | CLOSED DUPLICATE | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | amj87.iitr, daniel_megert, deepakazad, markus.kell.r, stephan.herrmann |
| Version: | 3.7 | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Paul Benedict
To clarify, my annotations are on methods. Moving to JDT/UI for follow up. I just found out this is also a problem for parameter-level annotations. Bug 79279 claims that this got fixed but that's not the case. Dani, I think Bug 79279 is about not allowing the user to extract a normal interface from an existing @interface? This issue is about an option to choice whether annotations should be copied to the new interface. Request makes sense and is indeed different from bug 79279. We probably have to add the option to Pull Up and Push Down as well. The next question is: How often will you actually want to copy the annotations? E.g. an @SuppressWarnings(...) annotation also often refers to the method body: @SuppressWarnings("unused") @Deprecated public void foo(final Object var) { } Maybe we should just never move the annotations. For method parameters, we already have a similar problem with the 'final' modifier that is useless in the interface. However, certain annotations such as @Nullable might be interesting to keep. A full-fledged solution could use a user-modifiable list of annotations that should be copied to abstract or interface methods, e.g. [ ] Copy annotations to interface methods Configure... ... where 'Configure...' is a link to a configuration dialog, similar to how we did it in the Rename Type dialog. See also bug 353472. Bug 386410 also fixes this for Extract Interface (i.e. don't copy annotations). *** This bug has been marked as a duplicate of bug 386410 *** |