vscode-java-test icon indicating copy to clipboard operation
vscode-java-test copied to clipboard

Support virtual workspaces

Open lszomoru opened this issue 4 years ago • 1 comments

👋 Hi there, Martin here, from the VS Code team.

Recently we've announced the Remote Repository feature that lets you browse and edit files and folders directly on GitHub.

Open Remote Repository... opens VSCode on a folder or workspace located on a virtual file system. We call this a virtual workspace. We observed that not all extension support this well, either because they can not, or they haven't thought about it.

It would be fantastic if you could test whether your extension can handle virtual workspaces:

Check out the Virtual Workspaces Extension Author Guide on how to do that.

When done, set the new virtualWorkspaces capability in your 'package.json'.

{
  "capabilities": {
    "virtualWorkspaces": true | false
  }
}
  • Use "virtualWorkspaces": true if your extension is prepared for virtual workspaces
  • Use "virtualWorkspaces": false if your extension should be disabled when a virtual workspace is opened

For questions and comments please use the Virtual Workspaces Tracking Issue.

Thanks for the support and the great work! ❤️

lszomoru avatar May 07 '21 11:05 lszomoru

Hi @lszomoru, I'm an AI Support assistant here to help with your issue. While the team reviews your request, I wanted to provide some possible tips and documentation that might help you in the meantime.

Here are some suggestions to add virtual-workspace support to your extension:

  • Follow the Virtual Workspaces Extension Author Guide: • https://github.com/microsoft/vscode/wiki/Virtual-Workspaces

  • Test in a virtual workspace by running Open Remote Repository… in VS Code, making sure your extension still activates and handles file operations.

  • In your package.json, declare the new capability:

    {
      "capabilities": {
        "virtualWorkspaces": true
      }
    }
    
  • Use the VS Code FileSystem API (vscode.workspace.fs) rather than Node’s fs, and avoid direct file-path assumptions. Check for URI schemes like vscode-remote or GitHub’s VFS.

  • See how the Java extension tracks this support: • https://github.com/redhat-developer/vscode-java/issues/1936

Other references with low confidence
  • vscode-spring-initializr: identical request to declare virtualWorkspaces in package.json • https://github.com/microsoft/vscode-spring-initializr/issues/185

  • vscode-spring-boot-dashboard: same feature ask • https://github.com/microsoft/vscode-spring-boot-dashboard/issues/132

  • vscode-maven: request for virtual workspace capability • https://github.com/microsoft/vscode-maven/issues/627

The team will respond to your issue shortly. I hope these suggestions are helpful in the meantime. If this comment helped you, please give it a 👍. If the suggestion was not helpful or incorrect, please give it a 👎. Your feedback helps us improve!

github-actions[bot] avatar Nov 12 '25 10:11 github-actions[bot]