[Improvement] - Referenced Libraries naming
As of now Referenced libraries are shown as list with jar names, and sometimes it is hard to guess what that is, for example we have core-3.4.0.jar, or context-2.3.2.jar, picture below.
Is it possible that to have something which intellij uses, to have groupId:artifactId:version?
Sounds a valid request
@jdneo , is this perhaps good first issue?
@mamilic If we can easily get the group id, artifact id and version from the jar files, then this should be a good first issue.
I need to find some time to investigate it. It would be great if you are willing to have a try :)
@jdneo , I can try. But if you have any hints where to look, please let me know. Thanks!
I've a question actually. Does every maven jar contains this pom.properties?
Seems it's not in some cases:
It seems that you are correct, however as I observed we would always have MANIFEST.MF. Could it be possible that JDTLS somehow proivides more info about the jars/dependencies? Also, I am wondering how may I run the extension in debug mode, when I try to launch it from VSCode it starts but then throws
rejected promise not handled within 1 second: Error: No delegateCommandHandler for java.resolvePath extensionHostProcess.js:162 stack trace: Error: No delegateCommandHandler for java.resolvePath at /home/mmilic/.vscode/extensions/redhat.java-1.35.1-linux-x64/dist/extension.js:2:1090351 at re (/home/mmilic/.vscode/extensions/redhat.java-1.35.1-linux-x64/dist/extension.js:2:1090645) at /home/mmilic/.vscode/extensions/redhat.java-1.35.1-linux-x64/dist/extension.js:2:1085429 at Immediate.<anonymous> (/home/mmilic/.vscode/extensions/redhat.java-1.35.1-linux-x64/dist/extension.js:2:1085449) at process.processImmediate (node:internal/timers:483:21) at process.callbackTrampoline (node:internal/async_hooks:130:17)
Do I need to do some presteps in order to run it?
Oh, sorry the contributing doc is missing for this repo.
You need to run npm run build-server to build the required jar.
If you want to debug java code in https://github.com/microsoft/vscode-java-dependency/tree/main/jdtls.ext/com.microsoft.jdtls.ext.core/src, you need to install https://marketplace.visualstudio.com/items?itemName=yaozheng.vscode-pde. And reload your vscode after the installation.
Then when you debugging the extension, run
after it's activated.
The code to get the jar files is at: https://github.com/microsoft/vscode-java-dependency/blob/6ee1c6bb29e293e3b7e5cd4477f8e5d43a0cf280/jdtls.ext/com.microsoft.jdtls.ext.core/src/com/microsoft/jdtls/ext/core/PackageCommand.java#L312
@jdneo , thanks for guidance!
I've managed to get the Java Projects show Maven Dependecies in format groupId:artifactId:version, however they are not sorted alphabetically. What would be your approach for this?
I guess you can add a sort logic at https://github.com/microsoft/vscode-java-dependency/blob/6ee1c6bb29e293e3b7e5cd4477f8e5d43a0cf280/src/views/containerNode.ts#L41
Fixed by #859