apache / netbeans

Apache NetBeans
https://netbeans.apache.org/
Apache License 2.0
2.64k stars 846 forks source link

New VSCode command JDK Configuration clashes with jdkhome 'machine' scope #7424

Open MartinBalin opened 4 months ago

MartinBalin commented 4 months ago

Apache NetBeans version

Apache NetBeans 22 release candidate

What happened

Using new JDK Configuration command to set all Java environments and extensions to same JDK. In the step 3/3 select Workspace Step3 Click OK and following warning is shown by VSCode for VSNetBeans: Warning It is caused by fact that in package.json netbeans.jdkhome has scope=machine This kind of break the purpose of JDK Configuration command for VSNetBeans if user wants to set that to Workspace level but VSNetBeans JDK runtime can be set only at machine/user level. This needs to be discussed how to change that. Allow to set JDK per workspace can allow to run each instance of VSNetBeans on own JDK version? Can help projects using various JDKs open in VSNetBeans. Implications:

  1. Does it affect setting Netbeans: Userdir: Local | global?
  2. How it affects VSNetBeans when running using Remote SSH on different host with different JDK?
  3. Probably more to consider...

Language / Project Type / NetBeans Component

No response

How to reproduce

Steps above

Did this work correctly in an earlier version?

No / Don't know

Operating System

macOS and others

JDK

JDK indepdendent

Apache NetBeans packaging

Apache VSNetBeans for VSCode

Anything else

No response

Are you willing to submit a pull request?

No

MartinBalin commented 4 months ago

Discussed with sdedic and dbalek. netbeans.jdkhome scope=machine will be changed to scope=machine-overridable as the 1st step. The next change will be adding new property for VSNetBeans project (folder) which will define what JDK is used in VSNetBeans for project actions - parsing, code completion, build debugging. This will effectively change current behaviour when VSNetBeans runtime JDK was used also for project and there was no possibility to change it.