eclipse-jdt / eclipse-jdt/eclipse.jdt.ui
QuickFix for adding missing annotation attributes should generate SingleMemberAnnotation if applicable
Open
- Dominant language
- Java
- Stars
- 59
- Forks
- 127
- Avg merge
- 22h 47m
- Merged PRs (30d)
- 28
Description
If you have an annotation of the form:
```java
public @interface MyAnnotation {
String value();
}
```
Then you can apply it to java code like this:
```java
@MyAnnotation("my string")
public class MyClass {
}
```
However, if you apply the QuickFix suggested when you have not filled in the required value:
```java
@MyAnnotation
public class MyClass {
}
```
Then it will do this instead:
```java
@MyAnnotation(value = "")
public class MyClass {
}
```
I think it'd be nice if the QuickFix used the compact syntax when it's able to.
Contributor guide
Assessment
This issue has not been assessed yet.