Skip to content

Merging main into telemetry #351

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 30 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
bc3e245
Updated the patch based on the netbeans PR review
shivam71 Nov 7, 2024
4701156
Updated CHANGELOG.md
Achal1607 Nov 6, 2024
710cedf
JVSC #253 | adding new l10n content for zh_CN and ja in lsp module
naren2605 Nov 10, 2024
bba9e60
Merge pull request #325 from naren2605/l10n-23.0.1
sid-srini Nov 11, 2024
648105e
Merge pull request #321 from Achal1607/changelog-23.0.1
sid-srini Nov 11, 2024
e581187
Fixed debugger attach operations
Achal1607 Nov 12, 2024
0397061
Merge pull request #328 from Achal1607/fix-debugger
sid-srini Nov 12, 2024
91dec3e
Updated CHANGELOG
Achal1607 Nov 26, 2024
9d946a1
Merge pull request #331 from Achal1607/changelog-update-bug
sid-srini Nov 26, 2024
cb1c4e7
JVSC #333 | fix readme content related to localization
naren2605 Nov 27, 2024
a0ad1ff
Merge pull request #334 from naren2605/fix-333
Achal1607 Nov 27, 2024
c1b3bbf
lib upgrade
subhash-arabhi Dec 6, 2024
e0ee543
Added JVM flag to disable JNI use warning
shivam71 Dec 7, 2024
5ce0b72
Updated vscode-languageclient TPLT
subhash-arabhi Dec 8, 2024
c8cfbb5
Fix for single README file
shivam71 Dec 9, 2024
3834c81
Removed duplicate END line in THIRD_PARTY_LICENSES.txt
subhash-arabhi Dec 10, 2024
2ff0fb3
Merge pull request #338 from shivam71/jni_warnings_fix
Achal1607 Dec 10, 2024
0c6d653
Merge pull request #324 from shivam71/MoveRefactoring_Fix_Update1
sid-srini Dec 10, 2024
59f15fd
Merge pull request #337 from subhash-arabhi/lib-upgrades-23.1.0
sid-srini Dec 10, 2024
b86b93a
Merge pull request #339 from shivam71/readme_fix
sid-srini Dec 10, 2024
1dc8c1e
Bump cross-spawn from 7.0.3 to 7.0.6 in /vscode
dependabot[bot] Dec 10, 2024
c4e7301
Merge branch 'main' into upgrade-dev-dependency
sid-srini Dec 10, 2024
c3a738d
Added the jvsce unit-tests to ant test-vscode-ext target
sid-srini Dec 10, 2024
74097d9
Fixed typos and added a relative link
shivam71 Dec 11, 2024
91a65d3
Merge pull request #344 from sid-srini/upgrade-dev-dependency
sid-srini Dec 11, 2024
7339eed
Draft patches 8036, 8038
subhash-arabhi Dec 12, 2024
5e0811f
Merge pull request #345 from shivam71/readme_update
sid-srini Dec 12, 2024
0e7152e
Merge pull request #348 from subhash-arabhi/minor-code-patches
sid-srini Dec 12, 2024
dd0f41f
Updated the labels associated with disable/enable NbJavac shown in th…
shivam71 Dec 13, 2024
879f59a
Merge pull request #349 from shivam71/update_label
sid-srini Dec 13, 2024
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
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,20 +65,20 @@ Project Explorer provides an overview of logical project structure, groups sourc

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

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

### Run Configurations panel
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).
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).
![Run Configuration](vscode/images/run_config.png)

## JDK Downloader
Expand Down Expand Up @@ -166,11 +166,12 @@ When adding JavaDoc to code Oracle Java Platform extension assists by suggesting
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.
![Test Explorer](vscode/images/Test_explorer.png)

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


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

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

Oracle Java Platform Extension for Visual Studio Code is licensed under [Apache 2.0 License](https://github.com/oracle/javavscode/blob/main/LICENSE.txt).
The [THIRD_PARTY_LICENSES](https://github.com/oracle/javavscode/blob/main/THIRD_PARTY_LICENSES.txt) file contains third party notices and licenses.
The [THIRD_PARTY_LICENSES](./THIRD_PARTY_LICENSES.txt) file contains third party notices and licenses.
104 changes: 44 additions & 60 deletions THIRD_PARTY_LICENSES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8761,12 +8761,14 @@ License Type: MIT
------------------ END OF DEPENDENCY LICENCE --------------------


Dependency: VSCode Language Server - Node
Dependency: vscode-languageclient
=========================================
------------------ START OF DEPENDENCY LICENSE --------------------
- vscode-languageclient

Copyright (c) Microsoft Corporation

License: MIT

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files
(the "Software"), to deal in the Software without restriction, including without
Expand All @@ -8783,64 +8785,14 @@ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

----------------------- Dependencies Grouped by License ------------
-------- Dependency
vscode-jsonrpc
-------- Copyrights
Copyright (c) Microsoft Corporation
Copyright (c) Microsoft Corporation. All rights reserved.
Copyrights are respective of each contributor listed at the beginning of each definition file.
-------- Notices
THIRD-PARTY SOFTWARE NOTICES AND INFORMATION
For Microsoft vscode-jsonrpc

This project incorporates material from the project(s) listed below (collectively, “Third Party Code”).
Microsoft is not the original author of the Third Party Code. The original copyright notice and license
under which Microsoft received such Third Party Code are set out below. This Third Party Code is licensed
to you under their original license terms set forth below. Microsoft reserves all other rights not expressly
granted, whether by implication, estoppel or otherwise.

1. DefinitelyTyped version 0.0.1 (https://github.com/borisyankov/DefinitelyTyped)

This project is licensed under the MIT license.
Copyrights are respective of each contributor listed at the beginning of each definition file.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

-------- Dependency
vscode-languageclient
-------- Copyrights
Copyright (c) Microsoft Corporation
Copyright (c) Microsoft Corporation. All rights reserved.
Copyrights are respective of each contributor listed at the beginning of each definition file.
Copyright (c) Isaac Z. Schlueter and Contributors
-------- Notices
--------- Notice ---------
THIRD-PARTY SOFTWARE NOTICES AND INFORMATION
For Microsoft vscode-languageclient

This project incorporates material from the project(s) listed below (collectively, “Third Party Code”).
Microsoft is not the original author of the Third Party Code. The original copyright notice and license
under which Microsoft received such Third Party Code are set out below. This Third Party Code is licensed
to you under their original license terms set forth below. Microsoft reserves all other rights not expressly
granted, whether by implication, estoppel or otherwise.

1. DefinitelyTyped version 0.0.1 (https://github.com/borisyankov/DefinitelyTyped)
2. semver version 6.3.0 (https://github.com/npm/node-semver)
3. minimatch version 3.0.4 (https://github.com/isaacs/minimatch)
Expand Down Expand Up @@ -8910,6 +8862,45 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
=========================================
END OF minimatch NOTICES AND INFORMATION

----------------------- Dependencies Grouped by License ------------
-------- Dependency
vscode-jsonrpc
-------- Copyrights
Copyright (c) Microsoft Corporation
Copyright (c) Microsoft Corporation. All rights reserved.
Copyrights are respective of each contributor listed at the beginning of each definition file.
-------- Notices
THIRD-PARTY SOFTWARE NOTICES AND INFORMATION
For Microsoft vscode-jsonrpc

This project incorporates material from the project(s) listed below (collectively, “Third Party Code”).
Microsoft is not the original author of the Third Party Code. The original copyright notice and license
under which Microsoft received such Third Party Code are set out below. This Third Party Code is licensed
to you under their original license terms set forth below. Microsoft reserves all other rights not expressly
granted, whether by implication, estoppel or otherwise.

1. DefinitelyTyped version 0.0.1 (https://github.com/borisyankov/DefinitelyTyped)

This project is licensed under the MIT license.
Copyrights are respective of each contributor listed at the beginning of each definition file.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

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


----------------------- Dependencies Grouped by License ------------
-------- Dependency
lru-cache
-------- Copyrights
Copyright (c) Isaac Z. Schlueter and Contributors

-------- Dependency
minimatch
-------- Copyrights
Expand All @@ -8995,10 +8981,8 @@ Copyright (c) Isaac Z. Schlueter and Contributors
Copyright Isaac Z. Schlueter

-------- Dependencies Summary
lru-cache
minimatch
semver
yallist

-------- License used by Dependencies
SPDX:ISC
Expand Down
32 changes: 28 additions & 4 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@
patches/7750.diff
patches/7910.diff
patches/7921.diff
patches/7923_draft.diff
patches/7923.diff
patches/7926.diff
patches/8036-draft.diff
patches/8038-draft.diff
patches/mvn-sh.diff
patches/generate-dependencies.diff
patches/rename-debugger.diff
Expand Down Expand Up @@ -246,19 +248,36 @@

<copy file="${basedir}/LICENSE.txt" todir="${basedir}/vscode" />
<copy file="${basedir}/THIRD_PARTY_LICENSES.txt" todir="${basedir}/vscode" />

<copy file="${basedir}/README.md" todir="${basedir}/vscode" />
<replace file="${basedir}/vscode/README.md" value="">
<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)
]]></replacetoken>
</replace>
<replace file="${basedir}/vscode/README.md" value="">
<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)
]]></replacetoken>
</replace>
<replace file="${basedir}/vscode/README.md" value="">
<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)
]]></replacetoken>
</replace>
<replace file="${basedir}/vscode/README.md" value="">
<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)
]]></replacetoken>
</replace>
<exec executable="${build.dir}/vsce/node_modules/.bin/vsce${cmd.suffix}" failonerror="true" dir="${basedir}/vscode">
<arg value="package" />
<arg line="${vsce.extra.args}" />
<arg value="--baseContentUrl" />
<arg value="https://github.com/oracle/javavscode/blob/${metabuild.hash}/vscode" />
<arg value="https://github.com/oracle/javavscode/blob/${metabuild.hash}/" />
<arg value="--baseImagesUrl" />
<arg value="https://github.com/oracle/javavscode/raw/${metabuild.hash}/vscode" />
<arg value="https://github.com/oracle/javavscode/raw/${metabuild.hash}/" />
<arg value="--out" />
<arg value="${build.dir}/oracle-java-${vsix.version}.vsix" />
</exec>
<delete file="${basedir}/vscode/LICENSE.txt"/>
<delete file="${basedir}/vscode/THIRD_PARTY_LICENSES.txt"/>
<delete file="${basedir}/vscode/README.md"/>
</target>
<target name="test-lsp-server" description="Tests the LSP server behavior">
<ant dir="nbcode" target="test" inheritall="false" inheritrefs="false">
Expand All @@ -269,6 +288,11 @@
</target>

<target name="test-vscode-ext" depends="test-lsp-server" description="Tests the Visual Studio Code extension built by 'build-vscode-ext' target.">
<exec executable="npm${cmd.suffix}" failonerror="true" dir="vscode">
<arg value="--allow-same-version"/>
<arg value="run" />
<arg value="test:unit" />
</exec>
<exec executable="npm${cmd.suffix}" failonerror="true" dir="vscode">
<arg value="--allow-same-version"/>
<arg value="run" />
Expand Down
24 changes: 24 additions & 0 deletions patches/7923.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
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
index a72abd44ef..12acbc7081 100644
--- 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
@@ -420,6 +420,9 @@ public final class MoveRefactoring extends CodeRefactoring {
}

private static Project getSelectedProject(NamedPath selectedProject) {
+ if (selectedProject == null) {
+ return null;
+ }
try {
String path = selectedProject.getPath();
return path != null ? FileOwnerQuery.getOwner(Utils.fromUri(path)) : null;
@@ -429,6 +432,9 @@ public final class MoveRefactoring extends CodeRefactoring {
}

private static FileObject getSelectedRoot(NamedPath selectedRoot) {
+ if (selectedRoot == null) {
+ return null;
+ }
try {
String path = selectedRoot.getPath();
return path != null ? Utils.fromUri(path) : null;
36 changes: 0 additions & 36 deletions patches/7923_draft.diff

This file was deleted.

Loading
Loading