Skip to content

Commit 52b6a53

Browse files
authored
Merge pull request #351 from oracle/main
Merging main into telemetry
2 parents ca6383d + 879f59a commit 52b6a53

25 files changed

+1588
-369
lines changed

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,20 +65,20 @@ Project Explorer provides an overview of logical project structure, groups sourc
6565

6666
## Debugger and Launch Configurations
6767
Language Server __Java+ ...__ launch configuration supports debugging and running Java applications using JDK11 or newer.
68-
1. The launch configuration (debugger) is invoked when `Run main | Debug main` code lense is selected in the code.
68+
1. The launch configuration (debugger) is invoked when `Run main | Debug main` codelens is selected in the code.
6969
2. Or __Java+...__ is selected in __Run and Debug__ activity panel.
7070
![Debug configurations](vscode/images/debuggers.png)
7171
### Launch Configurations
7272
* __Launch Java App__ - Debug or Run current Java project
7373
* __Attach to Port__ & __Attach to Process__ - Attach debugger actions. Available when __Java+ ...__ at the bottom of drop down list is selected.
7474
* Select this configuration, then click the ![Run](vscode/images/run.png)
7575
* Select either from available process or enter the port to connect to JVM running with JDWP.
76-
* __Attach to Shared Memory__ is available on Windows in addtion to above mentioned _Attach..._
76+
* __Attach to Shared Memory__ is available on Windows in addition to above mentioned _Attach..._
7777

7878
Default launch configurations provided by Language Server can modified in `launch.json` file.
7979

8080
### Run Configurations panel
81-
Program arguments, VM options, evironment variables,... can be set in Run Configuration panel a part of Explorer. The panel is sufficient for all typical use-cases Java programmer faces. Only advanced, expert scenarios may require touching of `launch.json` (which still takes precedence).
81+
Program arguments, VM options, environment variables,... can be set in Run Configuration panel a part of Explorer. The panel is sufficient for all typical use-cases Java programmer faces. Only advanced, expert scenarios may require touching of `launch.json` (which still takes precedence).
8282
![Run Configuration](vscode/images/run_config.png)
8383

8484
## JDK Downloader
@@ -166,11 +166,12 @@ When adding JavaDoc to code Oracle Java Platform extension assists by suggesting
166166
Oracle Java Platform extension provides Test Explorer view which allows to run all tests in a project, examine the results, go to source code and run particular test.
167167
![Test Explorer](vscode/images/Test_explorer.png)
168168

169-
### Localisation support
170-
Oracle Java Platform extension provides localisation support for _Japanese_ and _Simplified Chinese_.
171-
To switch language `Go to command Palette->Configure display language` select `ja` for _Japanese_ or `zh-cn` for _Simplified Chinese_
172-
![localisation.gif](vscode/images/localisation.gif)
169+
### Localization support
170+
Oracle Java Platform extension provides localization support for _Japanese_ and _Simplified Chinese_.
171+
To switch language `Go to command Palette->Configure display language` select `ja` for _Japanese_ or `zh-cn` for _Simplified Chinese_
173172

173+
174+
![Localization.gif](vscode/images/Localization.gif)
174175
## Selecting the JDK
175176
The JDK to build, run and debug projects is being searched in the following locations:
176177

@@ -212,4 +213,4 @@ Please consult the [security guide](https://github.com/oracle/javavscode/blob/ma
212213
Copyright (c) 2024 Oracle and/or its affiliates.
213214

214215
Oracle Java Platform Extension for Visual Studio Code is licensed under [Apache 2.0 License](https://github.com/oracle/javavscode/blob/main/LICENSE.txt).
215-
The [THIRD_PARTY_LICENSES](https://github.com/oracle/javavscode/blob/main/THIRD_PARTY_LICENSES.txt) file contains third party notices and licenses.
216+
The [THIRD_PARTY_LICENSES](./THIRD_PARTY_LICENSES.txt) file contains third party notices and licenses.

THIRD_PARTY_LICENSES.txt

Lines changed: 44 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -8761,12 +8761,14 @@ License Type: MIT
87618761
------------------ END OF DEPENDENCY LICENCE --------------------
87628762

87638763

8764-
Dependency: VSCode Language Server - Node
8764+
Dependency: vscode-languageclient
87658765
=========================================
8766+
------------------ START OF DEPENDENCY LICENSE --------------------
8767+
- vscode-languageclient
87668768

87678769
Copyright (c) Microsoft Corporation
8768-
87698770
License: MIT
8771+
87708772
Permission is hereby granted, free of charge, to any person
87718773
obtaining a copy of this software and associated documentation files
87728774
(the "Software"), to deal in the Software without restriction, including without
@@ -8783,64 +8785,14 @@ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
87838785
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
87848786
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
87858787
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8786-
8787-
----------------------- Dependencies Grouped by License ------------
8788-
-------- Dependency
8789-
vscode-jsonrpc
8790-
-------- Copyrights
8791-
Copyright (c) Microsoft Corporation
8792-
Copyright (c) Microsoft Corporation. All rights reserved.
8793-
Copyrights are respective of each contributor listed at the beginning of each definition file.
8794-
-------- Notices
8795-
THIRD-PARTY SOFTWARE NOTICES AND INFORMATION
8796-
For Microsoft vscode-jsonrpc
8797-
8798-
This project incorporates material from the project(s) listed below (collectively, “Third Party Code”).
8799-
Microsoft is not the original author of the Third Party Code. The original copyright notice and license
8800-
under which Microsoft received such Third Party Code are set out below. This Third Party Code is licensed
8801-
to you under their original license terms set forth below. Microsoft reserves all other rights not expressly
8802-
granted, whether by implication, estoppel or otherwise.
8803-
8804-
1. DefinitelyTyped version 0.0.1 (https://github.com/borisyankov/DefinitelyTyped)
8805-
8806-
This project is licensed under the MIT license.
8807-
Copyrights are respective of each contributor listed at the beginning of each definition file.
8808-
8809-
Permission is hereby granted, free of charge, to any person obtaining a copy
8810-
of this software and associated documentation files (the "Software"), to deal
8811-
in the Software without restriction, including without limitation the rights
8812-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8813-
copies of the Software, and to permit persons to whom the Software is
8814-
furnished to do so, subject to the following conditions:
8815-
8816-
The above copyright notice and this permission notice shall be included in
8817-
all copies or substantial portions of the Software.
8818-
8819-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
8820-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
8821-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
8822-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
8823-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
8824-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
8825-
THE SOFTWARE.
8826-
8827-
-------- Dependency
8828-
vscode-languageclient
8829-
-------- Copyrights
8830-
Copyright (c) Microsoft Corporation
8831-
Copyright (c) Microsoft Corporation. All rights reserved.
8832-
Copyrights are respective of each contributor listed at the beginning of each definition file.
8833-
Copyright (c) Isaac Z. Schlueter and Contributors
8834-
-------- Notices
8788+
--------- Notice ---------
88358789
THIRD-PARTY SOFTWARE NOTICES AND INFORMATION
88368790
For Microsoft vscode-languageclient
8837-
88388791
This project incorporates material from the project(s) listed below (collectively, “Third Party Code”).
88398792
Microsoft is not the original author of the Third Party Code. The original copyright notice and license
88408793
under which Microsoft received such Third Party Code are set out below. This Third Party Code is licensed
88418794
to you under their original license terms set forth below. Microsoft reserves all other rights not expressly
88428795
granted, whether by implication, estoppel or otherwise.
8843-
88448796
1. DefinitelyTyped version 0.0.1 (https://github.com/borisyankov/DefinitelyTyped)
88458797
2. semver version 6.3.0 (https://github.com/npm/node-semver)
88468798
3. minimatch version 3.0.4 (https://github.com/isaacs/minimatch)
@@ -8910,6 +8862,45 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
89108862
=========================================
89118863
END OF minimatch NOTICES AND INFORMATION
89128864

8865+
----------------------- Dependencies Grouped by License ------------
8866+
-------- Dependency
8867+
vscode-jsonrpc
8868+
-------- Copyrights
8869+
Copyright (c) Microsoft Corporation
8870+
Copyright (c) Microsoft Corporation. All rights reserved.
8871+
Copyrights are respective of each contributor listed at the beginning of each definition file.
8872+
-------- Notices
8873+
THIRD-PARTY SOFTWARE NOTICES AND INFORMATION
8874+
For Microsoft vscode-jsonrpc
8875+
8876+
This project incorporates material from the project(s) listed below (collectively, “Third Party Code”).
8877+
Microsoft is not the original author of the Third Party Code. The original copyright notice and license
8878+
under which Microsoft received such Third Party Code are set out below. This Third Party Code is licensed
8879+
to you under their original license terms set forth below. Microsoft reserves all other rights not expressly
8880+
granted, whether by implication, estoppel or otherwise.
8881+
8882+
1. DefinitelyTyped version 0.0.1 (https://github.com/borisyankov/DefinitelyTyped)
8883+
8884+
This project is licensed under the MIT license.
8885+
Copyrights are respective of each contributor listed at the beginning of each definition file.
8886+
8887+
Permission is hereby granted, free of charge, to any person obtaining a copy
8888+
of this software and associated documentation files (the "Software"), to deal
8889+
in the Software without restriction, including without limitation the rights
8890+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8891+
copies of the Software, and to permit persons to whom the Software is
8892+
furnished to do so, subject to the following conditions:
8893+
8894+
The above copyright notice and this permission notice shall be included in
8895+
all copies or substantial portions of the Software.
8896+
8897+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
8898+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
8899+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
8900+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
8901+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
8902+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
8903+
THE SOFTWARE.
89138904

89148905
-------- Dependency
89158906
vscode-languageserver-protocol
@@ -8978,11 +8969,6 @@ THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
89788969

89798970

89808971
----------------------- Dependencies Grouped by License ------------
8981-
-------- Dependency
8982-
lru-cache
8983-
-------- Copyrights
8984-
Copyright (c) Isaac Z. Schlueter and Contributors
8985-
89868972
-------- Dependency
89878973
minimatch
89888974
-------- Copyrights
@@ -8995,10 +8981,8 @@ Copyright (c) Isaac Z. Schlueter and Contributors
89958981
Copyright Isaac Z. Schlueter
89968982

89978983
-------- Dependencies Summary
8998-
lru-cache
89998984
minimatch
90008985
semver
9001-
yallist
90028986

90038987
-------- License used by Dependencies
90048988
SPDX:ISC

build.xml

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,10 @@
5858
patches/7750.diff
5959
patches/7910.diff
6060
patches/7921.diff
61-
patches/7923_draft.diff
61+
patches/7923.diff
6262
patches/7926.diff
63+
patches/8036-draft.diff
64+
patches/8038-draft.diff
6365
patches/mvn-sh.diff
6466
patches/generate-dependencies.diff
6567
patches/rename-debugger.diff
@@ -246,19 +248,36 @@
246248

247249
<copy file="${basedir}/LICENSE.txt" todir="${basedir}/vscode" />
248250
<copy file="${basedir}/THIRD_PARTY_LICENSES.txt" todir="${basedir}/vscode" />
249-
251+
<copy file="${basedir}/README.md" todir="${basedir}/vscode" />
252+
<replace file="${basedir}/vscode/README.md" value="">
253+
<replacetoken><![CDATA[[![Visual Studio Marketplace](https://img.shields.io/visual-studio-marketplace/v/Oracle.oracle-java?style=for-the-badge&label=VS%20Marketplace&logo=visual-studio-code)](https://marketplace.visualstudio.com/items?itemName=Oracle.oracle-java)
254+
]]></replacetoken>
255+
</replace>
256+
<replace file="${basedir}/vscode/README.md" value="">
257+
<replacetoken><![CDATA[[![Installs](https://img.shields.io/visual-studio-marketplace/i/Oracle.oracle-java?style=for-the-badge)](https://marketplace.visualstudio.com/items?itemName=Oracle.oracle-java)
258+
]]></replacetoken>
259+
</replace>
260+
<replace file="${basedir}/vscode/README.md" value="">
261+
<replacetoken><![CDATA[[![Build Status](https://img.shields.io/github/actions/workflow/status/oracle/javavscode/main.yml?branch=main&style=for-the-badge&logo=github)](https://github.com/oracle/javavscode/actions?query=workflow:Java%20Platform%20Support%20for%20Visual%20Studio%20Code)
262+
]]></replacetoken>
263+
</replace>
264+
<replace file="${basedir}/vscode/README.md" value="">
265+
<replacetoken><![CDATA[[![License](https://img.shields.io/github/license/oracle/javavscode?style=for-the-badge&logo=apache)](https://github.com/oracle/javavscode/blob/main/LICENSE.txt)
266+
]]></replacetoken>
267+
</replace>
250268
<exec executable="${build.dir}/vsce/node_modules/.bin/vsce${cmd.suffix}" failonerror="true" dir="${basedir}/vscode">
251269
<arg value="package" />
252270
<arg line="${vsce.extra.args}" />
253271
<arg value="--baseContentUrl" />
254-
<arg value="https://github.com/oracle/javavscode/blob/${metabuild.hash}/vscode" />
272+
<arg value="https://github.com/oracle/javavscode/blob/${metabuild.hash}/" />
255273
<arg value="--baseImagesUrl" />
256-
<arg value="https://github.com/oracle/javavscode/raw/${metabuild.hash}/vscode" />
274+
<arg value="https://github.com/oracle/javavscode/raw/${metabuild.hash}/" />
257275
<arg value="--out" />
258276
<arg value="${build.dir}/oracle-java-${vsix.version}.vsix" />
259277
</exec>
260278
<delete file="${basedir}/vscode/LICENSE.txt"/>
261279
<delete file="${basedir}/vscode/THIRD_PARTY_LICENSES.txt"/>
280+
<delete file="${basedir}/vscode/README.md"/>
262281
</target>
263282
<target name="test-lsp-server" description="Tests the LSP server behavior">
264283
<ant dir="nbcode" target="test" inheritall="false" inheritrefs="false">
@@ -269,6 +288,11 @@
269288
</target>
270289

271290
<target name="test-vscode-ext" depends="test-lsp-server" description="Tests the Visual Studio Code extension built by 'build-vscode-ext' target.">
291+
<exec executable="npm${cmd.suffix}" failonerror="true" dir="vscode">
292+
<arg value="--allow-same-version"/>
293+
<arg value="run" />
294+
<arg value="test:unit" />
295+
</exec>
272296
<exec executable="npm${cmd.suffix}" failonerror="true" dir="vscode">
273297
<arg value="--allow-same-version"/>
274298
<arg value="run" />

patches/7923.diff

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
diff --git a/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/refactoring/MoveRefactoring.java b/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/refactoring/MoveRefactoring.java
2+
index a72abd44ef..12acbc7081 100644
3+
--- a/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/refactoring/MoveRefactoring.java
4+
+++ b/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/refactoring/MoveRefactoring.java
5+
@@ -420,6 +420,9 @@ public final class MoveRefactoring extends CodeRefactoring {
6+
}
7+
8+
private static Project getSelectedProject(NamedPath selectedProject) {
9+
+ if (selectedProject == null) {
10+
+ return null;
11+
+ }
12+
try {
13+
String path = selectedProject.getPath();
14+
return path != null ? FileOwnerQuery.getOwner(Utils.fromUri(path)) : null;
15+
@@ -429,6 +432,9 @@ public final class MoveRefactoring extends CodeRefactoring {
16+
}
17+
18+
private static FileObject getSelectedRoot(NamedPath selectedRoot) {
19+
+ if (selectedRoot == null) {
20+
+ return null;
21+
+ }
22+
try {
23+
String path = selectedRoot.getPath();
24+
return path != null ? Utils.fromUri(path) : null;

patches/7923_draft.diff

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)