-
Notifications
You must be signed in to change notification settings - Fork 26
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
Investigate expected behaviour for the MicroProfileGenerateOpenAPIOperation code action. #649
Comments
Noting this issue we found in Liberty Tools Eclipse that had some overlap. It turned out to be a limitation with lsp4e not distinguishing between different CodeActionKind(s), which was not yet up to par with what VSCode offered in this area. This might be helpful: eclipse-lsp4e/lsp4e#867. (Though the full history of the original problem and how we noticed then worked around it might not be all that relevant). |
I and others have also observed that when you try to apply the "Generate OpenAPI Annotations" code action it doesn't seem to do anything. |
Your problem is exactly the same issue than redhat-developer/lsp4ij#99 like you have said and this morning I have implemented the issue. The generated open api code action marked with source should appear as ij intention and not as ij quickfix so it will appear without diagnostics |
While investigating #644, I noticed that "Generate OpenAPI Annotations" is only offered as a code action when there's a diagnostic. This code action isn't categorized as a quick fix and seems to have nothing to do with resolving the diagnostic (see screenshot).
In plugin.xml, the code action's kind is specified as
source
:<javaCodeActionParticipant kind="source" group="mp" implementationClass="io.openliberty.tools.intellij.lsp4mp4ij.psi.internal.openapi.java.MicroProfileGenerateOpenAPIOperation"/>
It seems like this code action should be offered to the user even when there's no diagnostic. We should confirm what behaviour is expected. This issue: redhat-developer/lsp4ij#99 opened against LSP4iJ may be related and might be the root cause, assuming that the code action should be available without a diagnostic.
The text was updated successfully, but these errors were encountered: