Skip to content

fix: expand non-Java workspace roots when resources are shown - #1075

Merged
wenyt (wenytang-ms) merged 3 commits into
mainfrom
fix/758-expand-non-java-workspace-roots
Sep 3, 2026
Merged

fix: expand non-Java workspace roots when resources are shown#1075
wenyt (wenytang-ms) merged 3 commits into
mainfrom
fix/758-expand-non-java-workspace-roots

Conversation

@wenytang-ms

@wenytang-ms wenyt (wenytang-ms) commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Expand workspace roots with no JDT projects from the filesystem when java.project.explorer.showNonJavaResources is enabled.
  • Keep the existing JDT-backed project hierarchy unchanged for workspace roots that already contain projects.
  • Apply files.exclude to filesystem-backed resources and keep those resources out of APIs that return Java project nodes.
  • Expose filesystem-backed resources as browse-only nodes instead of enabling mutation actions that require project watchers.
  • Extend the multi-root integration and AutoTest coverage added by fix: hide non-Java workspace roots when resources are hidden #1074.

Scope

This is the minimal Show counterpart to #1074. It makes filesystem-only roots expandable without merging ordinary filesystem resources into workspace roots that already contain JDT projects. Fallback resources can be browsed and opened, while mutation actions and automatic refresh for external filesystem changes remain outside this PR.

UI verification

Before: Hide

With Hide Non-Java Resources enabled, the filesystem-only non-java workspace root is not shown, while Java workspace roots remain available.

Non-Java workspace root hidden before switching to Show

After: Show

Switching to Show Non-Java Resources restores the non-java root, which can now be expanded to browse package.json.

Package JSON visible under the expanded non-Java workspace root

Validation

  • npx tsc -p . --noEmit
  • npm run tslint
  • npm run compile
  • JDT LS bundle build and VSIX packaging
  • Targeted multiple-suite: 4 passing
  • AutoTest 0.7.25 — Project Explorer: 48/48 passing

Fixes #758

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Conditional exclusions and resource actions are incorrect for supported filesystem configurations.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds filesystem browsing for non-Java roots in multi-root workspaces.

Changes:

  • Adds filesystem-backed explorer nodes with exclusion filtering.
  • Keeps Java project APIs limited to ProjectNode.
  • Extends tests, documentation, and localization.
File summaries
File Description
src/views/workspaceResourceFolderNode.ts Implements filesystem resource nodes.
src/views/workspaceNode.ts Loads resources for non-Java roots.
src/views/dependencyDataProvider.ts Filters root project results.
test/multiple-suite/projectView.test.ts Tests resources and exclusions.
test/e2e-plans/java-dep-project-explorer.yaml Verifies expandable non-Java roots.
README.md Documents browsing behavior.
package.nls.json Updates English setting text.
package.nls.zh-cn.json Updates Simplified Chinese text.
package.nls.zh-tw.json Updates Traditional Chinese text.
Review details
  • Files reviewed: 9/9 changed files
  • Comments generated: 2
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/views/workspaceResourceFolderNode.ts Outdated
Comment thread src/views/workspaceResourceFolderNode.ts Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Mutations in filesystem-only roots leave the tree stale because those roots are not watched for refreshes.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 9/9 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment thread src/views/workspaceResourceFolderNode.ts Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The implementation matches the stated scope and includes appropriate integration and deterministic UI coverage.

Review details
  • Files reviewed: 12/12 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@wenytang-ms
wenyt (wenytang-ms) merged commit 8b43aa1 into main Sep 3, 2026
34 of 35 checks passed
@wenytang-ms
wenyt (wenytang-ms) deleted the fix/758-expand-non-java-workspace-roots branch September 3, 2026 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot expand the resources under non-java root in multi-root workspace

3 participants