-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
Test improved workspace edit api #52800
Labels
Milestone
Comments
FYI - to test against the latest API do the following:
|
Here's an example to help with testing 'use strict';
// The module 'vscode' contains the VS Code extensibility API
// Import the module and reference it with the alias vscode in your code below
import * as vscode from 'vscode';
// this method is called when your extension is activated
// your extension is activated the very first time the command is executed
export function activate(context: vscode.ExtensionContext) {
let disposable = vscode.commands.registerCommand('extension.sayHello', () => {
const workspaceEdit = new vscode.WorkspaceEdit();
workspaceEdit.deleteFile(vscode.Uri.file('/Users/isidor/development/w/june/one'));
workspaceEdit.createFile(vscode.Uri.file('/Users/isidor/development/w/june/two'));
workspaceEdit.renameFile(vscode.Uri.file('/Users/isidor/development/w/june/two'), vscode.Uri.file('/Users/isidor/development/w/june/two'));
vscode.workspace.applyEdit(workspaceEdit);
});
context.subscriptions.push(disposable);
} |
This was referenced Jun 26, 2018
This was referenced Jun 26, 2018
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Refs: #10659
Complexity: 2
We have enhanced the WorkspaceEdit-api to allow to create, delete, and rename files. Test that
The text was updated successfully, but these errors were encountered: