Skip to content

Commit 419f2fd

Browse files
authored
Update to NB-25 (#382)
* upgraded language server to netbeans 25 * added frontend requirements of #7697 * Added support for #7740, #7815 and #7993 * added support for #7730 and #7958 * added support of #8000 * added support for #7749 * added support of #8159 * fixed failing localization tests * updated THIRD_PARTY_LICENSES.txt and update PreparedBundles.java to generate sha256 as the temp license name so that it doesn't create too long file names * addressed review comments * added parsing of vmArgs
1 parent 1cf54c1 commit 419f2fd

38 files changed

+761
-6934
lines changed

BUILD.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,10 @@ This configuration will enable you to debug both the extension’s TypeScript co
121121
```json
122122
"jdk.serverVmOptions": ["-J-Dnetbeans.logger.console=true"]
123123
```
124+
4. For further debugging you can set Log Level to FINEST by appending following argument to the array:
125+
```json
126+
"jdk.serverVmOptions": ["-J-Dnetbeans.logger.console=true", "-J-Dorg.netbeans.modules.java.lsp.server.lsptrace.level=FINEST"]
127+
```
124128

125129
Both options will enable logging from the NetBeans server in the VS Code Output Channel.
126130

THIRD_PARTY_LICENSES.txt

Lines changed: 366 additions & 439 deletions
Large diffs are not rendered by default.

build.xml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -45,21 +45,7 @@
4545
<loadresource property="patch-files">
4646
<string>
4747
patches/6330.diff
48-
patches/7491.diff
4948
patches/7610.diff
50-
patches/7641.diff
51-
patches/7654.diff
52-
patches/7670.diff
53-
patches/7699.diff
54-
patches/7709.diff
55-
patches/7722.diff
56-
patches/7724.diff
57-
patches/7733.diff
58-
patches/7750.diff
59-
patches/7910.diff
60-
patches/7921.diff
61-
patches/7923.diff
62-
patches/7926.diff
6349
patches/8036-draft.diff
6450
patches/8038-draft.diff
6551
patches/mvn-sh.diff
@@ -69,7 +55,6 @@
6955
patches/remove-db.diff
7056
patches/nbjavac-not-required.diff
7157
patches/l10n-licence.diff
72-
patches/no-security-manager-allow.diff
7358
patches/dev-dependency-licenses.diff
7459
</string>
7560
<filterchain>
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
package org.netbeans.modules.nbcode.integration;
20+
21+
import org.netbeans.modules.java.lsp.server.ui.AbstractApplyEditsImplementation;
22+
import org.netbeans.spi.lsp.ApplyEditsImplementation;
23+
import org.openide.util.lookup.ServiceProvider;
24+
25+
/**
26+
*
27+
* @author sdedic
28+
*/
29+
@ServiceProvider(service = ApplyEditsImplementation.class, position = 10000)
30+
public class LspApplyEditsImplementation extends AbstractApplyEditsImplementation{
31+
32+
}

nbcode/nbproject/platform.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,6 @@ disabled.modules=\
394394
org.netbeans.modules.j2ee.sun.dd,\
395395
org.netbeans.modules.j2ee.sun.ddui,\
396396
org.netbeans.modules.jakarta.transformer,\
397-
org.netbeans.modules.jakarta.web.beans,\
398397
org.netbeans.modules.jakartaee8.api,\
399398
org.netbeans.modules.jakartaee8.platform,\
400399
org.netbeans.modules.javaee7.api,\

netbeans

Submodule netbeans updated 5298 files

patches/6330.diff

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/ConnectionSpec.java b/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/ConnectionSpec.java
2-
index 9ab389564c..9b7c044c81 100644
2+
index bb8a4e8183..b9662fe6cd 100644
33
--- a/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/ConnectionSpec.java
44
+++ b/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/ConnectionSpec.java
55
@@ -25,7 +25,7 @@ import java.io.OutputStream;
@@ -86,11 +86,10 @@ index 9ab389564c..9b7c044c81 100644
8686
} catch (IOException ex) {
8787
if (isClosed(server)) {
8888
break;
89-
@@ -129,26 +152,54 @@ final class ConnectionSpec implements Closeable {
90-
}
89+
@@ -130,25 +153,53 @@ final class ConnectionSpec implements Closeable {
9190
};
9291
listeningThread.start();
93-
- out.write((prefix + " listening at port " + localPort).getBytes());
92+
out.write((prefix + " listening at port " + localPort + "\n").getBytes());
9493
+ StringBuilder message = new StringBuilder();
9594
+ message.append(prefix).append(" listening at port ").append(localPort);
9695
+ if (hash) {
@@ -128,7 +127,6 @@ index 9ab389564c..9b7c044c81 100644
128127
+ if (hashContent != null) {
129128
+ for (char c : hashContent) {
130129
+ byte b = (byte) in.read();
131-
+
132130
+ if (b != c) {
133131
+ IOException toThrow = new IOException("Hash validation failed!");
134132
+ try {
@@ -146,15 +144,21 @@ index 9ab389564c..9b7c044c81 100644
146144
connectionObject.getRunningFuture().get();
147145
} catch (IOException | InterruptedException | ExecutionException ex) {
148146
diff --git a/java/java.lsp.server/test/unit/src/org/netbeans/modules/java/lsp/server/ConnectionSpecTest.java b/java/java.lsp.server/test/unit/src/org/netbeans/modules/java/lsp/server/ConnectionSpecTest.java
149-
index 1035cf9bc8..55c0488d03 100644
147+
index f538c953f6..728228c63c 100644
150148
--- a/java/java.lsp.server/test/unit/src/org/netbeans/modules/java/lsp/server/ConnectionSpecTest.java
151149
+++ b/java/java.lsp.server/test/unit/src/org/netbeans/modules/java/lsp/server/ConnectionSpecTest.java
152-
@@ -118,7 +118,7 @@ public class ConnectionSpecTest {
150+
@@ -118,10 +118,12 @@ public class ConnectionSpecTest {
153151
ByteArrayInputStream in = new ByteArrayInputStream(bytes);
154152
ByteArrayOutputStream os = new ByteArrayOutputStream();
155153
conn.prepare("Pipe server", in, os, new LspSession(), ConnectionSpecTest::setCopy, ConnectionSpecTest::copy);
156154
- String reply = os.toString("UTF-8");
157155
+ String reply = os.toString("UTF-8").replaceAll("\n$", "");
158156
String exp = "Pipe server listening at port ";
159157
assertTrue(reply, reply.startsWith(exp));
160-
int port = Integer.parseInt(reply.substring(exp.length()));
158+
- int port = Integer.parseInt(reply.substring(exp.length(), reply.indexOf('\n', exp.length())));
159+
+ int nextLineIdx = reply.indexOf('\n', exp.length());
160+
+ if (nextLineIdx < 0) nextLineIdx = reply.length();
161+
+ int port = Integer.parseInt(reply.substring(exp.length(), nextLineIdx));
162+
assertTrue("port is specified: " + port, port >= 1024);
163+
try (ConnectionSpec second = ConnectionSpec.parse("connect:" + port)) {
164+
second.prepare("Pipe client", in, os, new LspSession(), ConnectionSpecTest::setCopy, ConnectionSpecTest::copy);

0 commit comments

Comments
 (0)