Skip to content

Commit 559570c

Browse files
committed
Addition of the java.lsp.server.telemetry module to obtain Java language
features from the NetBeans LSP Server. 1. Added nbcode.java.lsp.server.telemetry module to provide the implementation. 2. Added jdk.compiler module access to NBLS in launchOptions.ts Co-authored-by: Jan Lahoda @lahodaj Co-authored-by: Siddharth Srinivasan @sid-srini Signed-off-by: Siddharth Srinivasan <[email protected]>
1 parent 2c6e8d6 commit 559570c

File tree

17 files changed

+1024
-1
lines changed

17 files changed

+1024
-1
lines changed

nbcode/nbproject/project.properties

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,7 @@ auxiliary.org-netbeans-modules-apisupport-installer.os-solaris=false
2727
auxiliary.org-netbeans-modules-apisupport-installer.os-windows=false
2828
auxiliary.org-netbeans-spi-editor-hints-projects.perProjectHintSettingsFile=nbproject/cfg_hints.xml
2929
modules=\
30-
${project.org.netbeans.modules.nbcode.integration}
30+
${project.org.netbeans.modules.nbcode.integration} :\
31+
${project.org.netbeans.modules.nbcode.java.lsp.server.telemetry}
3132
project.org.netbeans.modules.nbcode.integration=integration
33+
project.org.netbeans.modules.nbcode.java.lsp.server.telemetry=telemetry

nbcode/telemetry/build.xml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
Copyright (c) 2024-2025, Oracle and/or its affiliates.
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
https://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
<project name="org.netbeans.modules.nbcode.java.lsp.server.telemetry" default="netbeans" basedir=".">
18+
<description>Builds, tests, and runs the project org.netbeans.modules.nbcode.java.lsp.server.telemetry.</description>
19+
<property file="nbproject/suite.properties"/>
20+
<property file="nbproject/project.properties"/>
21+
<property name="nbantext.jar" location="${suite.dir}/../netbeans/nbbuild/build/nbantext.jar" />
22+
<import file="nbproject/build-impl.xml"/>
23+
</project>

nbcode/telemetry/manifest.mf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Manifest-Version: 1.0
2+
AutoUpdate-Show-In-Client: false
3+
OpenIDE-Module: org.netbeans.modules.nbcode.java.lsp.server.telemetry
4+
OpenIDE-Module-Implementation-Version: 1
5+
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/nbcode/java/lsp/server/telemetry/Bundle.properties
6+
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
Copyright (c) 2024-2025, Oracle and/or its affiliates.
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
https://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
<project name="org.netbeans.modules.nbcode.java.lsp.server.telemetry-impl" basedir="..">
18+
<fail message="Please build using Ant 1.7.1 or higher.">
19+
<condition>
20+
<not>
21+
<antversion atleast="1.7.1"/>
22+
</not>
23+
</condition>
24+
</fail>
25+
<property file="nbproject/private/suite-private.properties"/>
26+
<property file="nbproject/suite.properties"/>
27+
<fail unless="suite.dir">You must set 'suite.dir' to point to your containing module suite</fail>
28+
<property file="${suite.dir}/nbproject/private/platform-private.properties"/>
29+
<property file="${suite.dir}/nbproject/platform.properties"/>
30+
<macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-project/2">
31+
<attribute name="name"/>
32+
<attribute name="value"/>
33+
<sequential>
34+
<property name="@{name}" value="${@{value}}"/>
35+
</sequential>
36+
</macrodef>
37+
<macrodef name="evalprops" uri="http://www.netbeans.org/ns/nb-module-project/2">
38+
<attribute name="property"/>
39+
<attribute name="value"/>
40+
<sequential>
41+
<property name="@{property}" value="@{value}"/>
42+
</sequential>
43+
</macrodef>
44+
<property file="${user.properties.file}"/>
45+
<nbmproject2:property name="harness.dir" value="nbplatform.${nbplatform.active}.harness.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
46+
<nbmproject2:property name="nbplatform.active.dir" value="nbplatform.${nbplatform.active}.netbeans.dest.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
47+
<nbmproject2:evalprops property="cluster.path.evaluated" value="${cluster.path}" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
48+
<fail message="Path to 'platform' cluster missing in $${cluster.path} property or using corrupt Netbeans Platform (missing harness).">
49+
<condition>
50+
<not>
51+
<contains string="${cluster.path.evaluated}" substring="platform"/>
52+
</not>
53+
</condition>
54+
</fail>
55+
<import file="${harness.dir}/build.xml"/>
56+
</project>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#
2+
# Copyright (c) 2024-2025, Oracle and/or its affiliates.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# https://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
build.xml.data.CRC32=bcbc94fb
17+
build.xml.script.CRC32=f4d83a2b
18+
build.xml.stylesheet.CRC32=[email protected]
19+
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
20+
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
21+
nbproject/build-impl.xml.data.CRC32=decee057
22+
nbproject/build-impl.xml.script.CRC32=547e2c6a
23+
nbproject/build-impl.xml.stylesheet.CRC32=[email protected]
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#
2+
# Copyright (c) 2024-2025, Oracle and/or its affiliates.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# https://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
javac.source=1.8
17+
requires.nb.javac=true
18+
javac.compilerargs=-Xlint -Xlint:-serial
19+
test.run.args=--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
20+
--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED \
21+
--add-exports=jdk.compiler/com.sun.tools.javac.resources=ALL-UNNAMED \
22+
--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \
23+
24+
test.unit.lib.cp=
25+
test.unit.run.cp.extra=
26+
license.file=../../LICENSE.txt
27+
nbm.homepage=https://github.com/oracle/javavscode/
28+
nbplatform.default.netbeans.dest.dir=${suite.dir}/../netbeans/nbbuild/netbeans
29+
nbplatform.default.harness.dir=${nbplatform.default.netbeans.dest.dir}/harness
30+
spec.version.base=1.0
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
Copyright (c) 2024-2025, Oracle and/or its affiliates.
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
https://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
<project xmlns="http://www.netbeans.org/ns/project/1">
18+
<type>org.netbeans.modules.apisupport.project</type>
19+
<configuration>
20+
<data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
21+
<code-name-base>org.netbeans.modules.nbcode.java.lsp.server.telemetry</code-name-base>
22+
<suite-component/>
23+
<module-dependencies>
24+
<dependency>
25+
<code-name-base>org.netbeans.api.lsp</code-name-base>
26+
<build-prerequisite/>
27+
<compile-dependency/>
28+
<run-dependency>
29+
<release-version>1</release-version>
30+
<specification-version>1.28</specification-version>
31+
</run-dependency>
32+
</dependency>
33+
<dependency>
34+
<code-name-base>org.netbeans.libs.javacapi</code-name-base>
35+
<build-prerequisite/>
36+
<compile-dependency/>
37+
<run-dependency>
38+
<implementation-version/>
39+
</run-dependency>
40+
</dependency>
41+
<dependency>
42+
<code-name-base>org.netbeans.modules.editor.mimelookup</code-name-base>
43+
<build-prerequisite/>
44+
<compile-dependency/>
45+
<run-dependency>
46+
<release-version>1</release-version>
47+
<specification-version>1.65</specification-version>
48+
</run-dependency>
49+
</dependency>
50+
<dependency>
51+
<code-name-base>org.netbeans.modules.java.lsp.server</code-name-base>
52+
<build-prerequisite/>
53+
<compile-dependency/>
54+
<run-dependency>
55+
<release-version>2</release-version>
56+
<implementation-version/>
57+
</run-dependency>
58+
</dependency>
59+
<dependency>
60+
<code-name-base>org.netbeans.modules.java.platform</code-name-base>
61+
<build-prerequisite/>
62+
<compile-dependency/>
63+
<run-dependency>
64+
<release-version>1</release-version>
65+
<specification-version>1.67</specification-version>
66+
</run-dependency>
67+
</dependency>
68+
<dependency>
69+
<code-name-base>org.netbeans.modules.java.project</code-name-base>
70+
<build-prerequisite/>
71+
<compile-dependency/>
72+
<run-dependency>
73+
<release-version>1</release-version>
74+
<specification-version>1.97</specification-version>
75+
</run-dependency>
76+
</dependency>
77+
<dependency>
78+
<code-name-base>org.netbeans.modules.java.source.base</code-name-base>
79+
<build-prerequisite/>
80+
<compile-dependency/>
81+
<run-dependency>
82+
<specification-version>2.68.0.6.4.3.8.1</specification-version>
83+
</run-dependency>
84+
</dependency>
85+
<dependency>
86+
<code-name-base>org.netbeans.modules.projectapi</code-name-base>
87+
<build-prerequisite/>
88+
<compile-dependency/>
89+
<run-dependency>
90+
<release-version>1</release-version>
91+
<specification-version>1.96</specification-version>
92+
</run-dependency>
93+
</dependency>
94+
<dependency>
95+
<code-name-base>org.openide.filesystems</code-name-base>
96+
<build-prerequisite/>
97+
<compile-dependency/>
98+
<run-dependency>
99+
<specification-version>9.38</specification-version>
100+
</run-dependency>
101+
</dependency>
102+
<dependency>
103+
<code-name-base>org.openide.util</code-name-base>
104+
<build-prerequisite/>
105+
<compile-dependency/>
106+
<run-dependency>
107+
<specification-version>9.33</specification-version>
108+
</run-dependency>
109+
</dependency>
110+
<dependency>
111+
<code-name-base>org.openide.util.lookup</code-name-base>
112+
<build-prerequisite/>
113+
<compile-dependency/>
114+
<run-dependency>
115+
<specification-version>8.59</specification-version>
116+
</run-dependency>
117+
</dependency>
118+
</module-dependencies>
119+
<test-dependencies>
120+
<test-type>
121+
<name>unit</name>
122+
<test-dependency>
123+
<code-name-base>org.netbeans.libs.junit4</code-name-base>
124+
<compile-dependency/>
125+
</test-dependency>
126+
<test-dependency>
127+
<code-name-base>org.netbeans.modules.nbjunit</code-name-base>
128+
<recursive/>
129+
<compile-dependency/>
130+
</test-dependency>
131+
</test-type>
132+
</test-dependencies>
133+
<public-packages/>
134+
</data>
135+
</configuration>
136+
</project>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#
2+
# Copyright (c) 2024-2025, Oracle and/or its affiliates.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# https://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
suite.dir=${basedir}/..
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#
2+
# Copyright (c) 2024-2025, Oracle and/or its affiliates.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# https://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
OpenIDE-Module-Display-Category=Java
17+
OpenIDE-Module-Name=Java LSP Server - Telemetry

0 commit comments

Comments
 (0)