mirror of
https://github.com/microsoft/vscode-extension-samples.git
synced 2026-06-13 07:10:26 +08:00
first cut simple extension for basic multi root APIs
This commit is contained in:
committed by
Dirk Baeumer
parent
e7b8bf70f0
commit
83cf5e7438
14
basic-multi-root-sample/README.md
Normal file
14
basic-multi-root-sample/README.md
Normal file
@ -0,0 +1,14 @@
|
||||
# Basic multi root API samples
|
||||
|
||||
This extension adds an entry to the status bar that shows the name of the currently active file. To excercise multi root APIs it:
|
||||
- only enables itself when more than one `WorkspaceFolder` is opened using `workspace.workspaceFolders` API
|
||||
- shows the name of the `WorkspaceFolder` the file is from (if any) using `workspace.getWorkspaceFolder()` API
|
||||
- updates when there are changes to the number of `WorkspaceFolder` via the `workspace.onDidChangeWorkspaceFolders()` API
|
||||
- registers a setting `multiRootSample.statusColor` with a scope of `resource` to configure a color per `WorkspaceFolder` to use for the status bar item
|
||||
|
||||
## Running the example
|
||||
|
||||
- Open this example in VS Code
|
||||
- `npm install`
|
||||
- `npm run compile`
|
||||
- `F5` to start debugging
|
||||
Reference in New Issue
Block a user