You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Workspace edit metadata needsConfirmation results in all checkboxes unchecked #200991
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:
constedit: VSCode.WorkspaceEdit=newVSCode.WorkspaceEdit();constfolders=VSCode.workspace.workspaceFolders;if(!folders||folders.length===0){VSCode.window.showInformationMessage('Open a folder first');return;}constnewFile=VSCode.Uri.joinPath(folders[0].uri,'foo.txt');edit.createFile(newFile,{overwrite: true},{label: 'New text',needsConfirmation: true});constinitialContent=newTextEdit(newRange(newPosition(0,0),newPosition(0,0)),"Hello World\nOne more line");edit.set(newFile,[initialContent]);VSCode.workspace.applyEdit(edit,{isRefactoring: true});
The described behavior is how it is expected to work. If you disagree, please explain what is expected and what is not in more detail. See also our issue reporting guidelines.
Activity
Raf-A2F commentedon Dec 18, 2023
DanTup commentedon Apr 11, 2024
Maybe same as #207578?
vs-code-engineering commentedon Dec 11, 2024
The described behavior is how it is expected to work. If you disagree, please explain what is expected and what is not in more detail. See also our issue reporting guidelines.
Happy Coding!
jrieken commentedon Dec 11, 2024
This is actually designed. Needs confirmation means the extension is unsure about this change and the user must explicitly accept it