-
Notifications
You must be signed in to change notification settings - Fork 37.5k
Closed as not planned
Closed as not planned
Copy link
Labels
*as-designedDescribed behavior is as designedDescribed behavior is as designeduxUser experience issuesUser experience issuesworkspace-edit
Description
The WorkspaceEdit that has metadata with needsConfirmation set to true shows the Refactor Preview which is great but all checkboxes are unchecked. I'd rather have all checkboxes checked.
I went through various git issues where showing Refactor View was first implemented. All screenshots show all changes check-marked. I also saw this one #144893 which also shows all changes check-marked and the request to check/uncheck a group of changes which would be useful.
However, I always have all changes unchecked and wonder how they could be all checked by default?
I'd appreciate a code snippet
For example i have this:
const edit: VSCode.WorkspaceEdit = new VSCode.WorkspaceEdit();
const folders = VSCode.workspace.workspaceFolders;
if (!folders || folders.length === 0) {
VSCode.window.showInformationMessage('Open a folder first');
return;
}
const newFile = VSCode.Uri.joinPath(folders[0].uri, 'foo.txt');
edit.createFile(newFile,
{ overwrite: true },
{ label: 'New text', needsConfirmation: true }
);
const initialContent = new TextEdit(new Range(new Position(0,0), new Position(0, 0)), "Hello World\nOne more line");
edit.set(newFile, [initialContent]);
VSCode.workspace.applyEdit(edit, { isRefactoring: true });How can i make checkboxes checked for the above?
DanTup
Metadata
Metadata
Assignees
Labels
*as-designedDescribed behavior is as designedDescribed behavior is as designeduxUser experience issuesUser experience issuesworkspace-edit