-
Notifications
You must be signed in to change notification settings - Fork 29
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
Workspace symbols for JAX-RS endpoints #313
Workspace symbols for JAX-RS endpoints #313
Conversation
I think that Jessica's PR should be merged before mine so that I can use some of the methods she introduces or modifies in |
@datho7561 could you add a little demo please in your PR, just to have an overview of your PR which looks exciting. Thanks! |
I need to do some work on this PR; it only seems to work if one of the files in the project is open. |
Nice! It looks like promising! |
It looks like this is a limitation of how lsp4mp handles projects. I'll take a look into fixing it. |
fb332dd
to
049750b
Compare
Alright. Now it should make sure all the projects in the workspace have been loaded before collecting symbols. Performance is okay, but not great. |
049750b
to
ddc4fe7
Compare
I'm running into a
Not sure if this is an upstream issue or something related to the parameters I passed to the search engine. Update: I think this might be upstream, I'll file this in jdt.core |
de30654
to
c7d7056
Compare
c7d7056
to
3ada9c8
Compare
...src/main/java/org/eclipse/lsp4mp/jdt/core/java/symbols/IJavaWorkspaceSymbolsParticipant.java
Outdated
Show resolved
Hide resolved
3ada9c8
to
f4ebe98
Compare
...src/main/java/org/eclipse/lsp4mp/jdt/core/java/symbols/IJavaWorkspaceSymbolsParticipant.java
Outdated
Show resolved
Hide resolved
.../org.eclipse.lsp4mp.jdt.core/src/main/java/org/eclipse/lsp4mp/jdt/core/jaxrs/JaxRsUtils.java
Outdated
Show resolved
Hide resolved
.../java/org/eclipse/lsp4mp/jdt/internal/core/ls/MicroProfileDelegateCommandHandlerForJava.java
Outdated
Show resolved
Hide resolved
...se.lsp4mp.jdt.core/src/main/java/org/eclipse/lsp4mp/jdt/internal/core/utils/ProjectUtil.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/eclipse/lsp4mp/jdt/internal/jaxrs/java/JaxRsWorkspaceSymbolParticipant.java
Outdated
Show resolved
Hide resolved
f4ebe98
to
bd5d732
Compare
@datho7561 please fix conflicts. |
...clipse.lsp4mp.jdt.core/src/main/java/org/eclipse/lsp4mp/jdt/core/MicroProfileCorePlugin.java
Outdated
Show resolved
Hide resolved
...n/java/org/eclipse/lsp4mp/jdt/internal/core/java/symbols/JavaWorkspaceSymbolsDefinition.java
Outdated
Show resolved
Hide resolved
.../java/org/eclipse/lsp4mp/jdt/internal/core/ls/MicroProfileDelegateCommandHandlerForJava.java
Outdated
Show resolved
Hide resolved
.../org.eclipse.lsp4mp.ls/src/main/java/org/eclipse/lsp4mp/ls/MicroProfileWorkspaceService.java
Show resolved
Hide resolved
Closes eclipse-lsp4mp#87 Signed-off-by: David Thompson <[email protected]>
bd5d732
to
adedf4d
Compare
I can't reproduce the test failure |
test this please |
darn, looks like that's not set up on this repo |
return; | ||
} | ||
|
||
String endpointUri = getEndpointUriFromAnnotatable(annotatable, applicationPrefix); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to play with your PR with https://github.com/FroMage/quarkus-renarde-todo/blob/main/src/main/java/rest/Todos.java and it doesn't work.
It seems it is because methods doesn't use @path although the method is annotated with @post. If there are no @path, we should use the method name if I remember.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok let's see that in an another PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took a look at how Renard figures out which methods are REST endpoints, and it looks like any public method in a class that implements io.quarkiverse.renarde.Controller counts as a REST endpoint. Generally, the logic for calculating the method name looks different enough that I think it's worthwhile to provide a mechanism for quarkus-ls to disable the default WorkspaceSymbol support when it detects Renarde, and instead use the Renard support contributed through quarkus-ls.
Thank so much @datho7561 for your great contribution! |
Closes #87
Signed-off-by: David Thompson [email protected]