| Summary: | [typing] Correct indentation is incorrect when annotation parameters are on a separate line | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Didier Loiseau <didierloiseau+eclipse> | ||||||||
| Component: | Text | Assignee: | Rajesh <rthakkar> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | daniel_megert, deepakazad | ||||||||
| Version: | 3.7 | Flags: | deepakazad:
review-
deepakazad: review- deepakazad: review+ |
||||||||
| Target Milestone: | 3.7 M6 | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Windows 7 | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Didier Loiseau
Rajesh, please check if this is still the case with your recent patches. (In reply to comment #1) > Rajesh, please check if this is still the case with your recent patches. Yes, this is still an issue even with latest patch and needs to be addressed separately. Created attachment 188661 [details]
Patch with test.
Deepak, please do the first review. - Patch does not work if fully qualified name of the annotation is used (see JavaIndenter.looksLikeAnonymousTypeDecl() on how to handle fully qualified names)
-------------------------------------------------------------------
package org.eclipse.annotation;
public @interface MyAnnotation {
String value();
}
package org.eclipse.test;
@org.eclipse.annotation.MyAnnotation(
value="hello")
public class ArrayAnnotationBug {
}
------------------------------------------------------------------
- Rename looksLikeAnnotationDecl to looksLikeAnnotation. "@interface MyAnnotation {...}" is the annotation declaration.
- Add "(i.e. an annotation name (potentially qualified) and an at-sign)" to the javadoc of looksLikeAnnotation.
Created attachment 188768 [details]
Patch with test.
Now handles qualified name.
The fix is good, but.. (In reply to comment #6) > Now handles qualified name. Please add a test for this. Created attachment 188903 [details]
Patch with test.
Committed to HEAD. Rajesh, thanks for the patch. |