Skip to content
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

Can't find methods in symbol search #1712

Open
ddadon10 opened this issue Nov 22, 2020 · 3 comments
Open

Can't find methods in symbol search #1712

ddadon10 opened this issue Nov 22, 2020 · 3 comments

Comments

@ddadon10
Copy link

ddadon10 commented Nov 22, 2020

Hi, thanks for this amazing extension :)

I can't find method in symbol search by doing > Go to Symbol in Workspace in VSCode. I only can find class.

But when I do > Go to Symbol in Editor I can find method and class in the current file.

Is it an issue related to VSCode? Or is it known that the plugin can't find methods using > Go to Symbol in Workspace?

Edit: Clean up the issue to improve readability.

@fbricon
Copy link
Collaborator

fbricon commented Nov 23, 2020

Workspace symbols are only available for types. So it's expected you won't find methods.
Given the search is performed for all types for all classpath dependencies of all the projects in the workspace, adding method search on top would most likely have a very negative impact on the performance

@ddadon10
Copy link
Author

Hi Fred :) Thanks for the answer!

Make sense,

How it would be possible to exclude classpath dependencies from the symbol search only and therefore enabling the method search without impacting performance?

Is it kind of related to this issue ?

Or is it more of a Java Server Language Server Issue?

Thanks!

@rgrunber
Copy link
Member

rgrunber commented Mar 4, 2022

With eclipse-jdtls/eclipse.jdt.ls#1688, this is partly supported through java.symbols.includeSourceMethodDeclarations . We don't include all methods in the classpath, because as mentioned above, that would be a huge performance hit. It's the main reason the property is disabled by default for just source methods.

Once eclipse-jdtls/eclipse.jdt.ls#1712 gets addressed, the performance should be less of an issue, but that depends on microsoft/vscode#105870 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants