-
Notifications
You must be signed in to change notification settings - Fork 78
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
"show decompiled" / "show semanticdb" etc. and split view #1131
Comments
I don't really know of a workaround except for a client-side A long-term solution would probably be to suggest adding a |
Current heuristic - find first matching editor (comment apparently lies) metals-vscode/src/metalsContentProvider.ts Lines 63 to 76 in 2954bca
Simple workaround - show all matching editors and let user pick one with quickpick if there's more than one. |
yeah, in the case of javap there's already a selection required (which class) - should there be another one or should it be a concatenation of each file's classes? |
Similar mechanism, but this time on frontend will be needed. Server accepts pair (uri, "decompile" kind (tasty, semanticDB, javap)) and it shows quickpick for cases when there are more eligible classes in given file. In this case, quickpick can be shown when there are more matching editors, but this can be done solely on the frontend side.
BTW, I can't reproduce it, I'm always getting semanticDB view for currently focused file 🤔 |
Describe the bug
When using a split view, using a command like "Show decompiled with javap" or "show semanticdb" may use the unexpected file (as in, not the one you currently have a cursor on).
It seems like Metals has a heuristic for picking the file based on the last edit / last opened file. I assume this is because
workspace/executeCommand
doesn't provide the currently focused file (it's not atextDocument
request, after all).To Reproduce Steps to reproduce the behavior:
Expected behavior
File B's semanticdb is shown
Screenshots
(make an edit in B)
(click on A, ask for semanticdb)
Installation:
Additional context
Search terms
split pane, split view, executeCommand, command
The text was updated successfully, but these errors were encountered: