-
Notifications
You must be signed in to change notification settings - Fork 401
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CodeAction for missing required attribute #1860
Comments
@angelozerr are you interested in contributing that feature? |
For the moment I'm busy, I don't know when I could do that, but I think I know how to implement this issue: we should copy/paste |
@rgrunber I'm interested in looking into this issue. I think it could be helpful for MicroProfile, which uses a lot of annotations. The other aspect of this issue is adding the required attributes automatically when accepting the completion for the annotation. Is there a setting in Eclipse to do this? If so, then I could take a look into adding it to eclipse.jdt.ls. If it's not already available in Eclipse (jdt.core/jdt.ui), maybe it's worthwhile adding it there first? |
Currently in Eclipse (JDT), there is no code to do this automatically as a cleanup, or on save. Only resolving it on the diagnostic/error marker. However, the important logic in Only issue I see if we want to move not only the code, but the class as a whole. lt extends |
Given this class:
The Generated has an error because value is required.:
It should be nice to provide a code action which insert this required attribute like Eclipse IDE provides:
CodeAction should fix like this:
The text was updated successfully, but these errors were encountered: