@@ -71,7 +71,14 @@ export class FixAllProvider extends AbstractProvider implements vscode.CodeActio
7171 }
7272
7373 private async applyFixes ( fileName : string , scope : FixAllScope , fixAllFilter : FixAllItem [ ] ) : Promise < boolean | string | { } > {
74- let response = await serverUtils . runFixAll ( this . server , { FileName : fileName , Scope : scope , FixAllFilter : fixAllFilter , WantsAllCodeActionOperations : true , WantsTextChanges : true } ) ;
74+ let response = await serverUtils . runFixAll ( this . server , {
75+ FileName : fileName ,
76+ Scope : scope ,
77+ FixAllFilter : fixAllFilter ,
78+ WantsAllCodeActionOperations : true ,
79+ WantsTextChanges : true ,
80+ ApplyChanges : false
81+ } ) ;
7582
7683 if ( response && Array . isArray ( response . Changes ) ) {
7784 let edit = new vscode . WorkspaceEdit ( ) ;
@@ -94,7 +101,7 @@ export class FixAllProvider extends AbstractProvider implements vscode.CodeActio
94101 {
95102 // The CodeAction requested that we open a file.
96103 // Record that file name and keep processing CodeActions.
97- // If a CodeAction requests that we open multiple files
104+ // If a CodeAction requests that we open multiple files
98105 // we only open the last one (what would it mean to open multiple files?)
99106 fileToOpen = vscode . Uri . file ( change . FileName ) ;
100107 }
@@ -127,7 +134,7 @@ export class FixAllProvider extends AbstractProvider implements vscode.CodeActio
127134 let next = applyEditPromise ;
128135 if ( renamedFiles . some ( r => r . fsPath == vscode . window . activeTextEditor . document . uri . fsPath ) )
129136 {
130- next = applyEditPromise . then ( _ =>
137+ next = applyEditPromise . then ( _ =>
131138 {
132139 return vscode . commands . executeCommand ( "workbench.action.closeActiveEditor" ) ;
133140 } ) ;
@@ -141,4 +148,4 @@ export class FixAllProvider extends AbstractProvider implements vscode.CodeActio
141148 : next ;
142149 }
143150 }
144- }
151+ }
0 commit comments