redhat-developer / vscode-java

Java Language Support for Visual Studio Code
Eclipse Public License 2.0
2.08k stars 441 forks source link

Support virtual workspaces #1936

Open lszomoru opened 3 years ago

lszomoru commented 3 years ago

👋 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
  }
}

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

Thanks for the support and the great work! ❤️

rgrunber commented 3 years ago

Doing a quick test on VSCode Insiders (with "capabilities": { "virtualWorkspaces": true }, it seems we'll need to support the vscode-vfs scheme for URIs on https://github.com/eclipse/eclipse.jdt.ls/, in addition to making sure we use proper URI API (and no file based assumptions).

testforstephen commented 3 years ago

The backend JDT has its own file system API EFS, and the usual implementation is based on disk files. We need to evaluate how to make it support virtual file system, such as accessing resources directly from a remote location.

Before we figure this out, we can just declare "virtualWorkspaces": false to disable virtual workspace support.

rgrunber commented 3 years ago

Some additional info :

It may not be as bad as we think assuming we just need to provide an implementation.

aeschli commented 3 years ago

IMO it would great to get single-file functionality thinks like outline, folding and document symbols.