-
Notifications
You must be signed in to change notification settings - Fork 401
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
Download sources for the masses #1628
Download sources for the masses #1628
Conversation
org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/MavenPropertiesIdentifier.java
Outdated
Show resolved
Hide resolved
org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/MavenPropertiesIdentifier.java
Outdated
Show resolved
Hide resolved
8d69975
to
112110b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/preferences/Preferences.java
Show resolved
Hide resolved
IIRC there's one case that doesn't work well: Take an invisible project with 2 jars in lib/ , if you hover over a class from jar 1, source is downloaded, classpath is updated with path to sources of jar 1, if you hover over a class from jar 2, source is downloaded, classpath is updated with path to sources of jar 2, but sourcepath of jar 1 is lost |
I could have a look and see what would be involved in fixing. I'd lean towards filing a separate bug for this as it would be good to get some initial support in for mid-January. UPDATE : @fbricon I tried a simple invisible project with 2 jars from maven central in lib/ and a source file with references to types from those jars. Whether I hovered/go-to defition on one and then the other while watching the hidden .classpath file and the classpath 'lib' entries were updated with a sourcepath to the local repository location and it never went away. |
...eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/managers/MavenSourceDownloader.java
Show resolved
Hide resolved
- Fixes redhat-developer/vscode-java#1664 - Download maven-central artifact's sources on-demand Signed-off-by: Fred Bricon <fbricon@gmail.com> [rgrunber@redhat.com]: Fix testDynamicSourceLookups() - Move testcase from HoverHandlerTest to InvisibleProjectBuildSupportTest - Set up the external library after project import to mimic approach in other invisible projects - Create IMavenArtifactIdentifier to be implemented by MavenPropertiesIdentifier and MavenCentralIdentifier Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
112110b
to
10aa622
Compare
I also tried an invisible project with 2 jars, and the source path metadata didn't disappear while hovering over the class from another jar. |
As redhat-developer/vscode-java#1758 is ready for submission and this change is also now in good shape, I'll be pushing these in by the end of today. |
Ok, so @fbricon clarified a possible reproducer and seems specific to invisible projects.
The first jar's source classpath should disappear likely due to a bug with the invisible project's classpath updating logic. I haven't tested this out, but if so, I can file a bug for this. |
Signed-off-by: Fred Bricon fbricon@gmail.com
[rgrunber@redhat.com]: Fix testDynamicSourceLookups()
in other invisible projects
Signed-off-by: Roland Grunberg rgrunber@redhat.com
@fbricon
Based on #1580 .