message: Apply remapp workspace edits for CodeActions
diff: @@ -101,8 +101,7 @@ export default class CodeActionProvider extends AbstractProvider implements vsco
  private async _runCodeAction(req: protocol.V2.RunCodeActionRequest): Promise<boolean | string | {}> {
  - return serverUtils.runCodeAction(this._server, req).then(response => {
  -
  + return serverUtils.runCodeAction(this._server, req).then(async response => {
  if (response && Array.isArray(response.Changes)) {
  let edit = new vscode.WorkspaceEdit();
  @@ -135,7 +134,7 @@ export default class CodeActionProvider extends AbstractProvider implements vsco
  let uri = vscode.Uri.file(change.FileName);
  if (renamedFiles.some(r => r == uri))
  {
  - // This file got renamed. Omnisharp has already
  + // This file got renamed. OmniSharp has already
  // persisted the new file with any applicable changes.
  continue;
  }
  @@ -149,6 +148,23 @@ export default class CodeActionProvider extends AbstractProvider implements vsco
  }
  }
  + // Allow language middlewares to re-map its edits if necessary.
  + try {
  + const languageMiddlewares = this._languageMiddlewareFeature.getLanguageMiddlewares();
  + for ( const middleware of languageMiddlewares)
  + {
  + if(!middleware.remapWorkspaceEdit) {
  + continue;
  + }
  +
  + const modifiedEdit = await middleware.remapWorkspaceEdit(edit, /*token*/ null);
  + edit = modifiedEdit;
  + }
  + }
  + catch (error) {
  + // Something happened while remapping locations. Return the original set of locations.
  + }
  +
  let applyEditPromise = vscode.workspace.applyEdit(edit);
  // Unfortunately, the textEditor.Close() API has been deprecated
  