Move reviveWorkspaceEditDto2 (#157572)

Notebook workspace edits currently only work in cases we have explicitly enabled them for. They don't work in code actions or on drop/paste

The root cause is that currently the edits need to be converted before they are passed along to the workbench bulk edit service. This is currently done by `reviveWorkspaceEditDto2`

This change moves the conversion logic into the bulk edit service itself
This commit is contained in:
Matt Bierner
2022-08-16 12:36:31 -04:00
committed by GitHub
parent 8462b71cdf
commit 107162c292
11 changed files with 58 additions and 58 deletions

View File

@@ -10,7 +10,7 @@ import { Disposable, DisposableStore } from 'vs/base/common/lifecycle';
import { clamp } from 'vs/base/common/numbers';
import * as strings from 'vs/base/common/strings';
import { URI } from 'vs/base/common/uri';
import { IBulkEditService, ResourceEdit, ResourceTextEdit } from 'vs/editor/browser/services/bulkEditService';
import { IBulkEditService, ResourceTextEdit } from 'vs/editor/browser/services/bulkEditService';
import { Range } from 'vs/editor/common/core/range';
import * as editorCommon from 'vs/editor/common/editorCommon';
import { FindMatch, IModelDecorationOptions, IModelDeltaDecoration, TrackedRangeStickiness } from 'vs/editor/common/model';
@@ -937,7 +937,7 @@ export class NotebookViewModel extends Disposable implements EditorFoldingStateD
return Promise.all(matches.map(match => {
return match.cell.resolveTextModel();
})).then(async () => {
this._bulkEditService.apply(ResourceEdit.convert({ edits: textEdits }), { quotableLabel: 'Notebook Replace All' });
this._bulkEditService.apply({ edits: textEdits }, { quotableLabel: 'Notebook Replace All' });
return;
});
}