This is an automated email from the ASF dual-hosted git repository.
sdedic 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 a0a9c45 Enable Groovy by default in vscode and NBJLS.
new 489d146 Merge pull request #3225 from sdedic/lsp/enable-groovy-support
a0a9c45 is described below
commit a0a9c453baf8018de5ff1e921f5298f059d9c267
Author: Svata Dedic <[email protected]>
AuthorDate: Fri Oct 8 16:35:10 2021 +0200
Enable Groovy by default in vscode and NBJLS.
---
.../modules/java/lsp/server/protocol/NbCodeClientCapabilities.java | 6 +++---
java/java.lsp.server/vscode/package.json | 2 +-
java/java.lsp.server/vscode/src/extension.ts | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git
a/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/protocol/NbCodeClientCapabilities.java
b/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/protocol/NbCodeClientCapabilities.java
index 17da0ae..8d5e6bc 100644
---
a/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/protocol/NbCodeClientCapabilities.java
+++
b/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/protocol/NbCodeClientCapabilities.java
@@ -59,7 +59,7 @@ public final class NbCodeClientCapabilities {
/**
* Asks for groovy support. Temporary option, will be removed.
*/
- private Boolean wantsGroovySupport;
+ private Boolean wantsGroovySupport = Boolean.TRUE;
public ClientCapabilities getClientCapabilities() {
return clientCaps;
@@ -94,11 +94,11 @@ public final class NbCodeClientCapabilities {
}
public void setWantGroovySupport(Boolean enableGroovy) {
- this.wantsGroovySupport = enableGroovy;
+ this.wantsGroovySupport = enableGroovy == null ? Boolean.TRUE :
enableGroovy;
}
public boolean wantsGroovySupport() {
- return wantsGroovySupport != null && wantsGroovySupport.booleanValue();
+ return wantsGroovySupport.booleanValue();
}
private NbCodeClientCapabilities withCapabilities(ClientCapabilities caps)
{
diff --git a/java/java.lsp.server/vscode/package.json
b/java/java.lsp.server/vscode/package.json
index c25d787..47e2be9 100644
--- a/java/java.lsp.server/vscode/package.json
+++ b/java/java.lsp.server/vscode/package.json
@@ -88,7 +88,7 @@
},
"netbeans.groovySupport.enabled": {
"type": "boolean",
- "default": false,
+ "default": true,
"description": "Enables experimental
Groovy and Spock support in Language Server"
}
}
diff --git a/java/java.lsp.server/vscode/src/extension.ts
b/java/java.lsp.server/vscode/src/extension.ts
index 55dc8eb..871a722 100644
--- a/java/java.lsp.server/vscode/src/extension.ts
+++ b/java/java.lsp.server/vscode/src/extension.ts
@@ -540,7 +540,7 @@ function doActivateWithJDK(specifiedJDK: string | null,
context: ExtensionContex
{ language: 'properties', pattern:
'**/{application,bootstrap}*.properties' },
{ language: 'jackpot-hint' }
];
- const enableGroovy : boolean =
conf.get("netbeans.groovySupport.enabled") || false;
+ const enableGroovy : boolean =
conf.get("netbeans.groovySupport.enabled") || true;
if (enableGroovy) {
documentSelectors.push({ language: 'groovy'});
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists