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

"Go to symbol" should prioritize local classes #3670

Open
gsturov opened this issue Jun 5, 2024 · 1 comment
Open

"Go to symbol" should prioritize local classes #3670

gsturov opened this issue Jun 5, 2024 · 1 comment

Comments

@gsturov
Copy link

gsturov commented Jun 5, 2024

I have local Start class in my source code.
When I use "Go to symbol" dialog to navigate to that class and type "Start" I have a bunch of Start classes from different libs on the top of the list and my class on the bottom.
The assumption should be that by default I am interested in my own class, so that class should be on the top of the list.

@gsturov gsturov changed the title "Go to symbol" should prefer local classes "Go to symbol" should prioritize local classes Jun 5, 2024
@rgrunber
Copy link
Member

rgrunber commented Jun 6, 2024

I think the client itself (VS Code ) is controlling this. We have had issues in the past simply getting the client to show certain symbols we felt should be included (eg. *) that the client interpreted literally. See also issues like microsoft/vscode#98125 .

Here's the order of elements from the language server for a given example :

sun.security.tools.jarsigner.Main
com.sun.tools.script.shell.Main
jdk.jfr.internal.tool.Main
sun.net.httpserver.simpleserver.Main
com.sun.tools.jdeps.Main
sun.security.tools.keytool.Main
javax.swing.colorchooser.DefaultSwatchChooserPanel.MainSwatchListener
jdk.jpackage.main.Main
com.sun.tools.javac.Main
jdk.internal.misc.MainMethodFinder
com.sun.tools.javac.main.Main
com.sun.tools.javap.Main
jdk.tools.jlink.internal.Main
javax.swing.colorchooser.DefaultSwatchChooserPanel.MainSwatchKeyListener
com.sun.tools.javac.launcher.Main
jdk.tools.jimage.Main
jdk.tools.jmod.Main
sun.tools.jar.Main
org.example.Main
jdk.javadoc.internal.tool.Main
org.example.Main.main
sun.jvm.hotspot.utilities.WorkerThread.MainLoop
javax.swing.colorchooser.MainSwatchPanel
com.sun.tools.jdeprscan.Main
com.sun.tools.javac.launcher.Main.MainClassListener

and here's the actual displayed order :

image

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

2 participants