-
Notifications
You must be signed in to change notification settings - Fork 448
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
Add support for "Go to implementation" #446
Comments
The current However, VSCode now has a show implementation shortcut (Ctrl+F12) (see microsoft/vscode#18346), so we should eventually be able to plug into that mechanism, but it's not been standardized yet. |
Also, it seems that "Go to super definition(or go to super method)" command doesn't exist in VSCode. And I really need it when navigating through Java or any other object-oriented code. Sigh. |
@fbricon Unless I'm misreading, both the dependency issues you listed are now merged/closed. Can this get put on the queue of things to do? I'd love to be able to quickly navigate to implementing classes. |
It looks the new update for VSCode has now the implementation for this, can we please make this happen? |
I would also like this feature a lot. I've switched to VS code for all my java projects but miss this feature mostly. |
Any updates on this functionality? |
I'm working on it. It should be available in a CI build next week and should be generally available for the end of August release |
Thank you! I appreciate the update. |
BTW the find implementors behavior in VSCode is a bit weird, always opens the 1st result then displays the list under that result: microsoft/vscode#55603 |
@jrieken I can't seem to be able to cancel textDocument/implementation queries. Is it me or a limitation in vscode? |
@fbricon Can you elaborate? Cancel would be initiated by the UI and signaled to the server through the LSP. Are you saying it doesn't arrive on the server? |
@aeschli indeed I don't see any cancellation event when hitting |
This is implemented generically as soon as a request provides a cancelation token. |
I tested this and pressing Esc when Goto Implementation is executed doesn't cancel the request. Please file an issue against VS Code itself so cancelation can be implemented there. |
Opened microsoft/vscode#57537 for the cancellation issue. For the rest, the feature seems to work as expected. Please note that java.lang.Object is treated as a special case. Since it will always return a huge list of results, precise location is disabled. Results will always point to Line 1, Char 1, so as to avoid opening thousands of files to compute the actual type location. |
Is this feature available to try? How can I get it to test it out? |
@aabuniaj you can download and install the latest java-*.vsix build from http://download.jboss.org/jbosstools/jdt.ls/staging/?C=M;O=D |
I just tried this, installed java-0.31.0-1204.vsix |
I am very happy that this feature is ready to use.
|
Okay, I figured out how this works. If you are placed on method call to an interface and select "Go to implementation" it will show you "No implementation found...", what you need to do is first select "Go to Definition" which navigates to the method definition in the interface and here you can select "Go to implementation" which correctly navigates to the implementation. I had hoped this was a one step process, usually I do not care about the definition, and it opens an extra file in my workspace. But it is still nice to be able to do it at all :-) |
yes, in VSCode, " Go to Definition" first and then "Go to implementation" works fine. |
It's nice to have this features. |
Would be nice to have this feature. VSCode for Java rocks ! |
@openvita see keymapping in vscode: |
Hello. Im new to vscode and java extension. I wanna see all implementation of target interface, like in jetbrains idea (crtl+alt+b). I setted up ctrl+alt+b for command java.show.implementations, but it always fail. IMHO thats strange becase implementationsCodeLens works fine. Any help?
Thanks.
Environment
Additional Informations
The text was updated successfully, but these errors were encountered: