You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 org.eclipse.jdt.internal.ui.text.correction.proposals.MissingAnnotationAttributesProposal inside JDT LS and adapt it.
@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 MissingAnnotationAttributesProposal is purely using rewriteAST(), which is what any cleanup uses. So it should be very easy to move that logic somewhere in core.manipulation and re-use it (in the UI components and JDT-LS).
Only issue I see if we want to move not only the code, but the class as a whole. lt extends LinkedCorrectionProposal which is on the UI side. it's field LinkedProposalModel seems to just use LinkedProposalModelCore now. I'm not sure if ASTRewriteCorrectionProposal can be easily migrated.
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: