-
Notifications
You must be signed in to change notification settings - Fork 29.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide additional workspace API (read / write) #35407
Comments
I like, tho the weird thing we need to communicate is that calling such API might restart the extension itself |
The 'openFolder' api has the same behavior and just includes this in the description:
|
…35407) (#36820) * Provide additional workspace API to add/remove workspace folders (for #35407) * add/removeFolders => add/removeFolder * make add/remove folder return a boolean * use proper service for workspace editing * workspac => workspace * do not log promise canceled messages * show confirm dialog
This landed as |
…35407) (#36820) * Provide additional workspace API to add/remove workspace folders (for #35407) * add/removeFolders => add/removeFolder * make add/remove folder return a boolean * use proper service for workspace editing * workspac => workspace * do not log promise canceled messages * show confirm dialog
@stef-levesque no, closing a workspace is currently not closing any documents. |
@EricJizbaMSFT no update so far other than this is "on deck" so it will happen eventually. Please talk to @egamma or @kieferrm to put some pressure on this if this must happen at a specific time and thus have it planned for an iteration. |
@EricJizbaMSFT can you share more details on your scenario of adding a workspace folder from an extension? |
azure function extension is a good example, it lets you create a new Azure Function "project", which is really just a folder. So, imagine I have a folder open, my web app called "stickerApp". It could be the only folder open, or it could be a part of a workspace. With the Azure Functions extension I choose to "Create a new Azure Function Project" from the command palette or the explorer commands. This command first prompts me for the folder location in which to scaffold the project: I choose Browse... and get the folder picker: And I pick some new folder called The At this point I probably want to start working on this function. Ideally it would be added to the explorer as a second top level root node: |
Today I can call vscode.openFolder to open a folder programmatically:
However, I would like to be able to do the same thing with the new multi-root workspace and just add a folder to the workspace. Something like this, but where I can pass in a Uri
For more context on our scenario, see @chrisdias's comments on this issue: #13807
NOTE: We realize such a command might restart the extension host, but we don't care if that happens.
The text was updated successfully, but these errors were encountered: