using the uri of the multi file editor instead of using the schema for individual files inside the multi diff editor

This commit is contained in:
Aiday Marlen Kyzy 2024-02-20 17:23:51 +01:00
parent 5c2f9eb177
commit 194a8dd18e
No known key found for this signature in database
GPG key ID: 24A8B53DBD26FF4E
3 changed files with 4 additions and 4 deletions

View file

@ -14,7 +14,6 @@ import { localize, localize2 } from 'vs/nls';
import { ViewPaneContainer } from 'vs/workbench/browser/parts/views/viewPaneContainer';
import { RawContextKey, IContextKeyService, IContextKey, ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService';
import { BulkEditPreviewProvider } from 'vs/workbench/contrib/bulkEdit/browser/preview/bulkEditPreview';
import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry';
import { KeyMod, KeyCode } from 'vs/base/common/keyCodes';
import { WorkbenchListFocusContextKey } from 'vs/platform/list/browser/listService';
@ -67,7 +66,7 @@ class UXState {
for (const input of group.editors) {
const resource = EditorResourceAccessor.getCanonicalUri(input, { supportSideBySide: SideBySideEditor.PRIMARY });
if (resource?.scheme === BulkEditPreviewProvider.Schema) {
if (resource?.scheme === BulkEditPane.Schema) {
previewEditors.push(input);
}
}

View file

@ -48,6 +48,7 @@ const enum State {
export class BulkEditPane extends ViewPane {
static readonly ID = 'refactorPreview';
static readonly Schema = 'vscode-bulkeditpreview-multieditor';
static readonly ctxHasCategories = new RawContextKey('refactorPreview.hasCategories', false);
static readonly ctxGroupByFile = new RawContextKey('refactorPreview.groupByFile', true);
@ -344,7 +345,7 @@ export class BulkEditPane extends ViewPane {
}
}
};
const multiDiffSource = URI.from({ scheme: 'refactor-preview' });
const multiDiffSource = URI.from({ scheme: BulkEditPane.Schema });
const label = 'Refactor Preview';
this._editorService.openEditor({
multiDiffSource,

View file

@ -351,7 +351,7 @@ export class BulkFileOperations {
export class BulkEditPreviewProvider implements ITextModelContentProvider {
static readonly Schema = 'vscode-bulkeditpreview';
private static readonly Schema = 'vscode-bulkeditpreview-editor';
static emptyPreview = URI.from({ scheme: BulkEditPreviewProvider.Schema, fragment: 'empty' });