Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ This configuration will enable you to debug both the extension’s TypeScript co
```json
"jdk.serverVmOptions": ["-J-Dnetbeans.logger.console=true"]
```
4. For further debugging you can set Log Level to FINEST by appending following argument to the array:
```json
"jdk.serverVmOptions": ["-J-Dnetbeans.logger.console=true", "-J-Dorg.netbeans.modules.java.lsp.server.lsptrace.level=FINEST"]
```

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

Expand Down
805 changes: 366 additions & 439 deletions THIRD_PARTY_LICENSES.txt

Large diffs are not rendered by default.

74 changes: 42 additions & 32 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,31 +45,25 @@
<loadresource property="patch-files">
<string>
patches/6330.diff
patches/7491.diff
patches/7610.diff
patches/7641.diff
patches/7654.diff
patches/7670.diff
patches/7699.diff
patches/7709.diff
patches/7722.diff
patches/7724.diff
patches/7733.diff
patches/7750.diff
patches/7910.diff
patches/7921.diff
patches/7923.diff
patches/7926.diff
patches/8036-draft.diff
patches/8038-draft.diff
patches/8210.diff
patches/8237.diff
patches/8242.diff
patches/8245.diff
patches/8255.diff
patches/8260.diff
patches/8280.diff
patches/8289.diff
patches/disable-error-notification.diff
patches/mvn-sh.diff
patches/project-marker-jdk.diff
patches/generate-dependencies.diff
patches/rename-debugger.diff
patches/remove-db.diff
patches/nbjavac-not-required.diff
patches/l10n-licence.diff
patches/no-security-manager-allow.diff
patches/dev-dependency-licenses.diff
patches/nb-telemetry.diff
</string>
Expand Down Expand Up @@ -209,8 +203,38 @@
</ant>
</target>



<target name="setup-vsce">
<mkdir dir="${build.dir}/vsce" />
<exec executable="npm${cmd.suffix}" failonerror="true" dir="${build.dir}/vsce">
<arg value="install" />
<arg value="--save" />
<arg value="@vscode/[email protected]" />
</exec>
<antcall target="apply-vsce-patch" inheritAll="true" />
</target>
<target name="check-vsce-patch-status">
<exec executable="patch" dir="${build.dir}/vsce/node_modules/@vscode/vsce/out" failifexecutionfails="false" failonerror="false" resultproperty="vsce-patch-status">
<arg value="-p1"/>
<arg value="--dry-run"/>
<arg value="--force"/>
<arg value="-z"/>
<arg value=".orig"/>
<arg value="-i"/>
<arg value="${basedir}/patches/vsce-package-ContentTypes.diff"/>
</exec>
<condition property="vsce.patch.toBeApplied" value="true" >
<equals arg1="${vsce-patch-status}" arg2="0" />
</condition>
</target>
<target name="apply-vsce-patch" if="vsce.patch.toBeApplied" depends="check-vsce-patch-status">
<exec executable="patch" dir="${build.dir}/vsce/node_modules/@vscode/vsce/out" failifexecutionfails="false" failonerror="false" resultproperty="vsce-patch-status">
<arg value="-p1"/>
<arg value="-z"/>
<arg value=".orig"/>
<arg value="-i"/>
<arg value="${basedir}/patches/vsce-package-ContentTypes.diff"/>
</exec>
</target>

<target name="build-vscode-ext" depends="add-extra-modules" description="Build the Visual Studio Code extension.">
<taskdef name="gitbranchhash" classname="org.netbeans.nbbuild.GitBranchHash" classpath="${nbantext.jar}" />
Expand Down Expand Up @@ -249,21 +273,7 @@
<arg value="-Dexec.args=${build.dir}/bundles ${nb_all}" />
</exec>

<mkdir dir="${build.dir}/vsce" />
<exec executable="npm${cmd.suffix}" failonerror="true" dir="${build.dir}/vsce">
<arg value="install" />
<arg value="--save" />
<arg value="@vscode/[email protected]" />
</exec>

<exec executable="patch" dir="${build.dir}/vsce/node_modules/@vscode/vsce/out" failifexecutionfails="false" failonerror="false">
<arg value="-p1"/>
<arg value="-z"/>
<arg value=".orig"/>
<arg value="-i"/>
<arg value="${basedir}/patches/vsce-package-ContentTypes.diff"/>
</exec>

<antcall target="setup-vsce" inheritAll="true" />
<move todir="${basedir}/vscode/node_modules" includeemptydirs="false">
<fileset dir="${basedir}/vscode/node_modules">
<include name="**/LICENSE"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.netbeans.modules.nbcode.integration;

import org.netbeans.modules.java.lsp.server.ui.AbstractApplyEditsImplementation;
import org.netbeans.spi.lsp.ApplyEditsImplementation;
import org.openide.util.lookup.ServiceProvider;

/**
*
* @author sdedic
*/
@ServiceProvider(service = ApplyEditsImplementation.class, position = 10000)
public class LspApplyEditsImplementation extends AbstractApplyEditsImplementation{

}
1 change: 0 additions & 1 deletion nbcode/nbproject/platform.properties
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,6 @@ disabled.modules=\
org.netbeans.modules.j2ee.sun.dd,\
org.netbeans.modules.j2ee.sun.ddui,\
org.netbeans.modules.jakarta.transformer,\
org.netbeans.modules.jakarta.web.beans,\
org.netbeans.modules.jakartaee8.api,\
org.netbeans.modules.jakartaee8.platform,\
org.netbeans.modules.javaee7.api,\
Expand Down
2 changes: 1 addition & 1 deletion netbeans
Submodule netbeans updated 5298 files
20 changes: 12 additions & 8 deletions patches/6330.diff
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
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
index 9ab389564c..9b7c044c81 100644
index bb8a4e8183..b9662fe6cd 100644
--- 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
@@ -25,7 +25,7 @@ import java.io.OutputStream;
Expand Down Expand Up @@ -86,11 +86,10 @@ index 9ab389564c..9b7c044c81 100644
} catch (IOException ex) {
if (isClosed(server)) {
break;
@@ -129,26 +152,54 @@ final class ConnectionSpec implements Closeable {
}
@@ -130,25 +153,53 @@ final class ConnectionSpec implements Closeable {
};
listeningThread.start();
- out.write((prefix + " listening at port " + localPort).getBytes());
out.write((prefix + " listening at port " + localPort + "\n").getBytes());
+ StringBuilder message = new StringBuilder();
+ message.append(prefix).append(" listening at port ").append(localPort);
+ if (hash) {
Expand Down Expand Up @@ -128,7 +127,6 @@ index 9ab389564c..9b7c044c81 100644
+ if (hashContent != null) {
+ for (char c : hashContent) {
+ byte b = (byte) in.read();
+
+ if (b != c) {
+ IOException toThrow = new IOException("Hash validation failed!");
+ try {
Expand All @@ -146,15 +144,21 @@ index 9ab389564c..9b7c044c81 100644
connectionObject.getRunningFuture().get();
} catch (IOException | InterruptedException | ExecutionException ex) {
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
index 1035cf9bc8..55c0488d03 100644
index f538c953f6..728228c63c 100644
--- 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
@@ -118,7 +118,7 @@ public class ConnectionSpecTest {
@@ -118,10 +118,12 @@ public class ConnectionSpecTest {
ByteArrayInputStream in = new ByteArrayInputStream(bytes);
ByteArrayOutputStream os = new ByteArrayOutputStream();
conn.prepare("Pipe server", in, os, new LspSession(), ConnectionSpecTest::setCopy, ConnectionSpecTest::copy);
- String reply = os.toString("UTF-8");
+ String reply = os.toString("UTF-8").replaceAll("\n$", "");
String exp = "Pipe server listening at port ";
assertTrue(reply, reply.startsWith(exp));
int port = Integer.parseInt(reply.substring(exp.length()));
- int port = Integer.parseInt(reply.substring(exp.length(), reply.indexOf('\n', exp.length())));
+ int nextLineIdx = reply.indexOf('\n', exp.length());
+ if (nextLineIdx < 0) nextLineIdx = reply.length();
+ int port = Integer.parseInt(reply.substring(exp.length(), nextLineIdx));
assertTrue("port is specified: " + port, port >= 1024);
try (ConnectionSpec second = ConnectionSpec.parse("connect:" + port)) {
second.prepare("Pipe client", in, os, new LspSession(), ConnectionSpecTest::setCopy, ConnectionSpecTest::copy);
Loading