-
Notifications
You must be signed in to change notification settings - Fork 454
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
No Java runtime version displayed for non-invisible project created under the jdt.ls workspace #2552
Comments
Hold on. I'm not convinced the problem is on the JDT-LS side just yet. There might be some thing we need to fix with eclipse-jdtls/eclipse.jdt.ls#2178 (CC @jdneo ) but here's what I'm seeing : I have latest vscode-java (from sources) and your vscode-jbang pre-release installed, and can confirm the Java version (from the status provider, among other things fails to show up). For background, the runtime status bar provider shows when the opened (active) file is owned by a project. This is roughly when some project path is a prefix of the opened file URI. In my case the file path is : Of course those never match, so the status provider fails to display since it doesn't query the project for the additional info. Note that the project list comes from So is vscode-jbang generating this |
Yes, JBang importer generates the
Looks like the I can think of two solutions to this problem:
|
FYI I might also add a mode where the folder, instead of the file, is linked. |
Some context
I'm trying to get JBang scripts work OOTB in VS Code. Since the classpath dependencies are coded right in the Java file, I use a similar mechanism to invisible projects to create a Java project under the jdt.ls workspace, that is then augmented with informations gathered from the JBang directives in the original file. This is based on jbang-eclipse. The jdt.ls integration is currently living on my fork. Finally, the VS Code Java integration can be found at https://github.com/fbricon/vscode-jbang, one can install a CI build of the vscode-jbang.vsix from the latest release page.
Now.
When I open a folder containing a JBang script, say hello.java:
After opening the file, the Java Runtime version is not displayed. It should show JavaSE-17 (or whatever is matching the
//JAVA version
comment in the file.I have a strong feeling Invisible project detection conflicts with other projects under the jdt.ls workspace. Chance are, we'll need to identify invisible projects differently, i.e. by adding them an invisible project specific nature.
The text was updated successfully, but these errors were encountered: