Skip to content

Commit c4e7301

Browse files
committed
Merge branch 'main' into upgrade-dev-dependency
Signed-off-by: Siddharth Srinivasan <[email protected]>
2 parents e63d237 + 1dc8c1e commit c4e7301

23 files changed

+1217
-368
lines changed

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ Java Platform extension from Oracle brings full featured development support (ed
4040
- For more information, see the section [Selecting the JDK](#selecting-the-jdk).
4141
4. Use any one of the following ways to start coding, compiling and debugging in Java.
4242
- Simply create a new Java class with `public static void main(String[] args)` method.
43-
- Use the __Java: New File...__ command to create a new Java file.
43+
- Use the __Java: New File from Template...__ command to create a new Java file.
4444
- Use the __Java: New Project...__ command to create a new project.
4545
- Open the folder with existing __Maven__ or __Gradle__ project files (_pom.xml_ or _build.gradle, gradle.properties_).
4646

4747
## Supported Actions
4848
In the VS Code command palette :
4949
* __Java: New Project...__ allows creation of new Maven or Gradle project
50-
* __Java: New File...__ add various files to currently selected open project. Files are:
50+
* __Java: New File from Template...__ add various files to currently selected open project. Files are:
5151
* Java - broad selection of various predefined Java classes
5252
* Unit tests - JUnit and TestNG templates for test suites and test cases
5353
* Other - various templates for Javascript, JSON, YAML, properties, ... files
@@ -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

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: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
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
6363
patches/mvn-sh.diff
6464
patches/generate-dependencies.diff
@@ -246,19 +246,36 @@
246246

247247
<copy file="${basedir}/LICENSE.txt" todir="${basedir}/vscode" />
248248
<copy file="${basedir}/THIRD_PARTY_LICENSES.txt" todir="${basedir}/vscode" />
249-
249+
<copy file="${basedir}/README.md" todir="${basedir}/vscode" />
250+
<replace file="${basedir}/vscode/README.md" value="">
251+
<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)
252+
]]></replacetoken>
253+
</replace>
254+
<replace file="${basedir}/vscode/README.md" value="">
255+
<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)
256+
]]></replacetoken>
257+
</replace>
258+
<replace file="${basedir}/vscode/README.md" value="">
259+
<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)
260+
]]></replacetoken>
261+
</replace>
262+
<replace file="${basedir}/vscode/README.md" value="">
263+
<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)
264+
]]></replacetoken>
265+
</replace>
250266
<exec executable="${build.dir}/vsce/node_modules/.bin/vsce${cmd.suffix}" failonerror="true" dir="${basedir}/vscode">
251267
<arg value="package" />
252268
<arg line="${vsce.extra.args}" />
253269
<arg value="--baseContentUrl" />
254-
<arg value="https://github.com/oracle/javavscode/blob/${metabuild.hash}/vscode" />
270+
<arg value="https://github.com/oracle/javavscode/blob/${metabuild.hash}/" />
255271
<arg value="--baseImagesUrl" />
256-
<arg value="https://github.com/oracle/javavscode/raw/${metabuild.hash}/vscode" />
272+
<arg value="https://github.com/oracle/javavscode/raw/${metabuild.hash}/" />
257273
<arg value="--out" />
258274
<arg value="${build.dir}/oracle-java-${vsix.version}.vsix" />
259275
</exec>
260276
<delete file="${basedir}/vscode/LICENSE.txt"/>
261277
<delete file="${basedir}/vscode/THIRD_PARTY_LICENSES.txt"/>
278+
<delete file="${basedir}/vscode/README.md"/>
262279
</target>
263280
<target name="test-lsp-server" description="Tests the LSP server behavior">
264281
<ant dir="nbcode" target="test" inheritall="false" inheritrefs="false">

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)