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

Add ability to attach missing sources #233

Closed
fbricon opened this issue Jun 8, 2017 · 6 comments
Closed

Add ability to attach missing sources #233

fbricon opened this issue Jun 8, 2017 · 6 comments
Assignees

Comments

@fbricon
Copy link
Collaborator

fbricon commented Jun 8, 2017

If a class file has no known source, a disassembled source is displayed instead.
There should be a way to easily attach missing sources to the jar containing the file in question.

Originally suggested by @jtsiros on https://marketplace.visualstudio.com/items?itemName=redhat.java#review-details

@fbricon
Copy link
Collaborator Author

fbricon commented Sep 12, 2018

@yaohaizh @testforstephen I think this could be implemented via a menu/command with stock vscode-java

@akaroml
Copy link
Contributor

akaroml commented Oct 11, 2018

Propose a workflow:

  1. Show "Open Folder" dialog to let users pick the location of the additional source
  2. Persist the location into user settings - "java.additionalSourceLocations: []"
  3. Language server follows the setting and works with those additional source locations

@akaroml
Copy link
Contributor

akaroml commented Oct 11, 2018

@testforstephen can you take a look?

@testforstephen testforstephen self-assigned this Oct 11, 2018
@testforstephen
Copy link
Collaborator

The ux is adding a context menu Update Source Attachment on the disassembled source editor (JdtContentProvider). When the user clicks the menu, pop up a Open File dialog to select the source jar/zip file. Then binding the source attachment to the binary path, and re-rendering the class file contents in VS Code.

@fbricon
Copy link
Collaborator Author

fbricon commented Nov 14, 2018

Fixed with #699, thanks to @testforstephen

screen shot 2018-11-13 at 7 05 33 pm

@mikedoy
Copy link

mikedoy commented Jul 12, 2022

When I attach source, where is this information stored? I'm not seeing it in my settings.json.

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