You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by db...@apache.org on 2022/08/01 06:41:10 UTC

[netbeans] branch master updated: LSP: Cloud explorer should be hidden with Java support switched off. (#4449)

This is an automated email from the ASF dual-hosted git repository.

dbalek pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git


The following commit(s) were added to refs/heads/master by this push:
     new 06a31ed66a LSP: Cloud explorer should be hidden with Java support switched off. (#4449)
06a31ed66a is described below

commit 06a31ed66a97a0be7c9c9fe2a2fc0477f7b7e8b9
Author: Dusan Balek <du...@oracle.com>
AuthorDate: Mon Aug 1 08:41:03 2022 +0200

    LSP: Cloud explorer should be hidden with Java support switched off. (#4449)
---
 java/java.lsp.server/vscode/package.json     | 2 +-
 java/java.lsp.server/vscode/src/extension.ts | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/java/java.lsp.server/vscode/package.json b/java/java.lsp.server/vscode/package.json
index 6eb49353a9..7658d06858 100644
--- a/java/java.lsp.server/vscode/package.json
+++ b/java/java.lsp.server/vscode/package.json
@@ -75,7 +75,7 @@
 				{
 					"id": "cloud.resources",
 					"name": "Cloud",
-					"when": "nbJavaLSReady"
+					"when": "nbJavaLSReady && config.netbeans.javaSupport.enabled"
 				},
 				{
 					"id": "run-config",
diff --git a/java/java.lsp.server/vscode/src/extension.ts b/java/java.lsp.server/vscode/src/extension.ts
index 37a707950c..0bbe6daf70 100644
--- a/java/java.lsp.server/vscode/src/extension.ts
+++ b/java/java.lsp.server/vscode/src/extension.ts
@@ -307,7 +307,7 @@ export function activate(context: ExtensionContext): VSNetBeansAPI {
                     if (DISABLE_EXTENSION === selected) {
                         vscode.commands.executeCommand('workbench.extensions.action.showInstalledExtensions');
                     } else if (DISABLE_JAVA === selected) {
-                        conf.update("netbeans.javaSupport.enabled", true, false);
+                        conf.update("netbeans.javaSupport.enabled", false, true);
                     }
                 });
             }
@@ -963,7 +963,9 @@ function doActivateWithJDK(specifiedJDK: string | null, context: ExtensionContex
             }
 
             createDatabaseView(c);
-            c.findTreeViewService().createView('cloud.resources', undefined, { canSelectMany : false });
+            if (enableJava) {
+                c.findTreeViewService().createView('cloud.resources', undefined, { canSelectMany : false });
+            }
         }).catch(setClient[1]);
     }).catch((reason) => {
         activationPending = false;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists