microsoft / vscode-maven

VSCode extension "Maven for Java"
https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-maven
Other
182 stars 88 forks source link

Feature request: possibility go to source code of attached dependencies #912

Closed ltorok closed 1 year ago

ltorok commented 1 year ago

Suggestion

It would be nice go to definition of source code JavaFX classes (generally some other source). When now "I select Go to Definition" (or using of key shortcut F12) for example on javafx.application.Application in editor of my source Java class, then I am got to Application.class which start is // Failed to get sources. Instead, stub sources have been generated by the disassembler. // Implementation of methods is unavailable.

Use Cases

I want to use this for I go to source code of JavaFX or generally some other source. With current approaches I don't know go to source code.

Examples

After when if select "I select Go to Definition" (or using of key shortcut F12) for example on javafx.application.Application in editor of my source Java class, then I go to source code of Application.java in package javafx.application (is opened new tab/editor with source code for Application.java in package javafx.application ).

Note: for example particular for JavaFX I have src.zip file local on my disk where are all source codes

Eskibear commented 1 year ago

@testforstephen might have more knowledge about best practice to attach sources.

ltorok commented 1 year ago

I found this: https://github.com/redhat-developer/vscode-java/issues/1315

ltorok commented 1 year ago

... but it was super hidden

testforstephen commented 1 year ago

Yes, there is a context menu "Attach Source" for that.

screen shot 2018-11-13 at 7 05 33 pm
Eskibear commented 1 year ago

@ltorok Then we can discuss about increasing the exposure of this feature in vscode-java repo.