diff --git a/microprofile.jdt/com.redhat.microprofile.jdt.core/src/main/java/com/redhat/microprofile/jdt/internal/openapi/java/MicroProfileGenerateOpenAPIOperation.java b/microprofile.jdt/com.redhat.microprofile.jdt.core/src/main/java/com/redhat/microprofile/jdt/internal/openapi/java/MicroProfileGenerateOpenAPIOperation.java index 745c431cc..840246074 100644 --- a/microprofile.jdt/com.redhat.microprofile.jdt.core/src/main/java/com/redhat/microprofile/jdt/internal/openapi/java/MicroProfileGenerateOpenAPIOperation.java +++ b/microprofile.jdt/com.redhat.microprofile.jdt.core/src/main/java/com/redhat/microprofile/jdt/internal/openapi/java/MicroProfileGenerateOpenAPIOperation.java @@ -56,11 +56,9 @@ public List getCodeActions(JavaCodeActionContext context, (TypeDeclaration) type, MicroProfileOpenAPIConstants.OPERATION_ANNOTATION, 0); // Convert the proposal to LSP4J CodeAction CodeAction codeAction = context.convertToCodeAction(proposal); - if (codeAction == null) { // Always show the code action - codeAction = new CodeAction(proposal.getName()); - codeAction.setKind(proposal.getKind()); + if (codeAction != null) { + codeActions.add(codeAction); } - codeActions.add(codeAction); } } return codeActions;