Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 6 additions & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,9 @@ jobs:

- name: Print language server Log if job failed
if: ${{ failure() }}
run: find $HOME/.config/Code/User/workspaceStorage/*/redhat.java/jdt_ws/.metadata/.log -print -exec cat '{}' \;;
run: |
if [ -z "$JAVA_TEST_USER_DIR" ] || [ ! -d "$JAVA_TEST_USER_DIR/User/workspaceStorage" ]; then
echo "::warning::Java test workspace storage is unavailable; the test host may not have started."
exit 0
fi
find "$JAVA_TEST_USER_DIR/User/workspaceStorage" -path '*/redhat.java/jdt_ws/.metadata/.log' -print -exec cat '{}' \;
7 changes: 6 additions & 1 deletion .github/workflows/macOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,9 @@ jobs:

- name: Print language server Log if job failed
if: ${{ failure() }}
run: find $HOME/Library/Application\ Support/Code/User/workspaceStorage/*/redhat.java/jdt_ws/.metadata/.log -print -exec cat '{}' \;;
run: |
if [ -z "$JAVA_TEST_USER_DIR" ] || [ ! -d "$JAVA_TEST_USER_DIR/User/workspaceStorage" ]; then
echo "::warning::Java test workspace storage is unavailable; the test host may not have started."
exit 0
fi
find "$JAVA_TEST_USER_DIR/User/workspaceStorage" -path '*/redhat.java/jdt_ws/.metadata/.log' -print -exec cat '{}' \;
8 changes: 7 additions & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,10 @@ jobs:

- name: Print language server Log if job failed
if: ${{ failure() }}
run: Get-ChildItem -Path $env:APPDATA/Code/User/workspaceStorage/*/redhat.java/jdt_ws/.metadata/.log | cat
run: |
if (-not $env:JAVA_TEST_USER_DIR -or -not (Test-Path "$env:JAVA_TEST_USER_DIR\User\workspaceStorage")) {
Write-Warning 'Java test workspace storage is unavailable; the test host may not have started.'
exit 0
}
Get-ChildItem -Path "$env:JAVA_TEST_USER_DIR\User\workspaceStorage\*\redhat.java\jdt_ws\.metadata\.log" -Force |
ForEach-Object { Write-Output $_.FullName; Get-Content -LiteralPath $_.FullName }
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ All notable changes to the "vscode-java-dependency" extension will be documented
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## 0.27.7

- fix - Prevent duplicate Java project roots and incorrect workspace-folder grouping in multi-root workspaces in https://github.com/microsoft/vscode-java-dependency/pull/1061
- fix - Hide duplicate empty physical folder hierarchies while preserving non-Java resources in https://github.com/microsoft/vscode-java-dependency/pull/1063
- fix - Hide workspace roots without Java projects when non-Java resources are hidden in https://github.com/microsoft/vscode-java-dependency/pull/1074
- enhancement - Allow browsing and opening files in non-Java workspace roots when non-Java resources are shown, respecting `files.exclude`, in https://github.com/microsoft/vscode-java-dependency/pull/1075
- ux - Move the Show/Hide Non-Java Resources action to the Java Projects view toolbar in https://github.com/microsoft/vscode-java-dependency/pull/1078
- fix - Align experimental Java LSP navigation tool contracts and distinguish navigation locations from full declaration read ranges in https://github.com/microsoft/vscode-java-dependency/pull/1099
- enhancement - Add Spanish localization for commands, settings, task definitions, and Java Projects welcome views in https://github.com/microsoft/vscode-java-dependency/pull/1101

## 0.27.6

- enhancement - Prefer Java upgrade over CVE in dependency recommendations in https://github.com/microsoft/vscode-java-dependency/pull/1033
Expand Down
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ To set up the vscode-java-dependency project, follow these steps:
- Run the "Attach to Plugin" task.
- Note: This task is required only if you want to debug Java code [jdtls.ext](./jdtls.ext). It requires the [vscode-pde](https://marketplace.visualstudio.com/items?itemName=yaozheng.vscode-pde) extension to be installed.

## Integration Tests

After building the server JAR and installing dependencies, run `npm test`. The Gradle fixture uses Gradle 9.1.0 to support the JDK 25 bundled with the Java extension.

The runner prints its temporary VS Code user data directory and exports it as `JAVA_TEST_USER_DIR` in GitHub Actions. CI reads Java language server logs from that directory's `User/workspaceStorage`, rather than the default VS Code profile.

## Java LSP Tool Contract Tests

After installing dependencies, run `npm run test-lsp-tools` for the isolated navigation-tool suite. It compiles TypeScript and starts a separate VS Code test host; no Java server build, Java project, or signed-in Copilot session is required. Set `VSCODE_EXECUTABLE_PATH` to reuse an existing VS Code executable instead of downloading one.
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vscode-java-dependency",
"displayName": "Project Manager for Java",
"description": "%description%",
"version": "0.27.6",
"version": "0.27.7",
"publisher": "vscjava",
"preview": false,
"aiKey": "5c642b22-e845-4400-badb-3f8509a70777",
Expand Down
2 changes: 1 addition & 1 deletion test/gradle/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"java.server.launchMode": "Standard",
"java.import.gradle.version": "7.3"
"java.import.gradle.version": "9.1.0"
}
4 changes: 4 additions & 0 deletions test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ async function main(): Promise<void> {
// test fails in macOS since the limitation of path length
// See: https://github.com/microsoft/vscode/issues/86382#issuecomment-593765388
const userDir = fs.mkdtempSync(path.join(os.tmpdir(), "vscode-user"));
process.stdout.write(`Test user data directory: ${userDir}${os.EOL}`);
if (process.env.GITHUB_ENV) {
fs.appendFileSync(process.env.GITHUB_ENV, `JAVA_TEST_USER_DIR=${userDir}${os.EOL}`);
}
const vscodeExecutablePath = await downloadAndUnzipVSCode();

// Resolve redhat.java dependency
Expand Down
Loading