diff --git a/extensions/git/src/repository.ts b/extensions/git/src/repository.ts index f39f3691272..7a74b77fb33 100644 --- a/extensions/git/src/repository.ts +++ b/extensions/git/src/repository.ts @@ -5,7 +5,7 @@ import * as fs from 'fs'; import * as path from 'path'; -import { CancellationToken, Command, Disposable, Event, EventEmitter, Memento, OutputChannel, ProgressLocation, ProgressOptions, scm, SourceControl, SourceControlInputBox, SourceControlInputBoxValidation, SourceControlInputBoxValidationType, SourceControlResourceDecorations, SourceControlResourceGroup, SourceControlResourceState, ThemeColor, Uri, window, workspace, WorkspaceEdit, FileDecoration, commands, Tab, TextDiffTabInput, NotebookEditorDiffTabInput } from 'vscode'; +import { CancellationToken, Command, Disposable, Event, EventEmitter, Memento, OutputChannel, ProgressLocation, ProgressOptions, scm, SourceControl, SourceControlInputBox, SourceControlInputBoxValidation, SourceControlInputBoxValidationType, SourceControlResourceDecorations, SourceControlResourceGroup, SourceControlResourceState, ThemeColor, Uri, window, workspace, WorkspaceEdit, FileDecoration, commands, Tab, TextDiffTabInput, NotebookDiffEditorTabInput } from 'vscode'; import TelemetryReporter from '@vscode/extension-telemetry'; import * as nls from 'vscode-nls'; import { Branch, Change, ForcePushMode, GitErrorCodes, LogOptions, Ref, RefType, Remote, Status, CommitOptions, BranchQuery, FetchOptions } from './api/git'; @@ -1274,7 +1274,7 @@ export class Repository implements Disposable { for (const tab of window.tabGroups.groups.map(g => g.tabs).flat()) { const { input } = tab; - if (input instanceof TextDiffTabInput || input instanceof NotebookEditorDiffTabInput) { + if (input instanceof TextDiffTabInput || input instanceof NotebookDiffEditorTabInput) { if (input.modified.scheme === 'git' && indexResources.some(r => pathEquals(r, input.modified.fsPath))) { // Index diffEditorTabsToClose.push(tab); diff --git a/src/vs/workbench/api/common/extHost.api.impl.ts b/src/vs/workbench/api/common/extHost.api.impl.ts index 416be9c1439..0d6587f70a8 100644 --- a/src/vs/workbench/api/common/extHost.api.impl.ts +++ b/src/vs/workbench/api/common/extHost.api.impl.ts @@ -1328,7 +1328,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I TextDiffTabInput: extHostTypes.TextDiffTabInput, CustomEditorTabInput: extHostTypes.CustomEditorTabInput, NotebookEditorTabInput: extHostTypes.NotebookEditorTabInput, - NotebookEditorDiffTabInput: extHostTypes.NotebookEditorDiffTabInput + NotebookDiffEditorTabInput: extHostTypes.NotebookDiffEditorTabInput }; }; } diff --git a/src/vs/workbench/api/common/extHostDebugService.ts b/src/vs/workbench/api/common/extHostDebugService.ts index 6fa79702cc6..2b1854dbe8a 100644 --- a/src/vs/workbench/api/common/extHostDebugService.ts +++ b/src/vs/workbench/api/common/extHostDebugService.ts @@ -11,7 +11,7 @@ import { MainContext, MainThreadDebugServiceShape, ExtHostDebugServiceShape, DebugSessionUUID, IBreakpointsDeltaDto, ISourceMultiBreakpointDto, IFunctionBreakpointDto, IDebugSessionDto } from 'vs/workbench/api/common/extHost.protocol'; -import { Disposable, Position, Location, SourceBreakpoint, FunctionBreakpoint, DebugAdapterServer, DebugAdapterExecutable, DataBreakpoint, DebugConsoleMode, DebugAdapterInlineImplementation, DebugAdapterNamedPipeServer, TextDiffTabInput, NotebookEditorDiffTabInput, TextTabInput, NotebookEditorTabInput, CustomEditorTabInput } from 'vs/workbench/api/common/extHostTypes'; +import { Disposable, Position, Location, SourceBreakpoint, FunctionBreakpoint, DebugAdapterServer, DebugAdapterExecutable, DataBreakpoint, DebugConsoleMode, DebugAdapterInlineImplementation, DebugAdapterNamedPipeServer, TextDiffTabInput, NotebookDiffEditorTabInput, TextTabInput, NotebookEditorTabInput, CustomEditorTabInput } from 'vs/workbench/api/common/extHostTypes'; import { AbstractDebugAdapter } from 'vs/workbench/contrib/debug/common/abstractDebugAdapter'; import { IExtHostWorkspace } from 'vs/workbench/api/common/extHostWorkspace'; import { IExtHostExtensionService } from 'vs/workbench/api/common/extHostExtensionService'; @@ -956,7 +956,7 @@ export class ExtHostVariableResolverService extends AbstractVariableResolverServ const activeTab = editorTabs.tabGroups.groups.find(group => group.isActive)?.activeTab; if (activeTab !== undefined) { // Resolve a resource from the tab - if (activeTab.input instanceof TextDiffTabInput || activeTab.input instanceof NotebookEditorDiffTabInput) { + if (activeTab.input instanceof TextDiffTabInput || activeTab.input instanceof NotebookDiffEditorTabInput) { return activeTab.input.modified; } else if (activeTab.input instanceof TextTabInput || activeTab.input instanceof NotebookEditorTabInput || activeTab.input instanceof CustomEditorTabInput) { return activeTab.input.uri; diff --git a/src/vs/workbench/api/common/extHostEditorTabs.ts b/src/vs/workbench/api/common/extHostEditorTabs.ts index 3a242d84172..586c6005c45 100644 --- a/src/vs/workbench/api/common/extHostEditorTabs.ts +++ b/src/vs/workbench/api/common/extHostEditorTabs.ts @@ -9,7 +9,7 @@ import { IEditorTabDto, IEditorTabGroupDto, IExtHostEditorTabsShape, MainContext import { URI } from 'vs/base/common/uri'; import { Emitter } from 'vs/base/common/event'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; -import { CustomEditorTabInput, NotebookEditorDiffTabInput, NotebookEditorTabInput, TextDiffTabInput, TextTabInput, ViewColumn } from 'vs/workbench/api/common/extHostTypes'; +import { CustomEditorTabInput, NotebookDiffEditorTabInput, NotebookEditorTabInput, TextDiffTabInput, TextTabInput, ViewColumn } from 'vs/workbench/api/common/extHostTypes'; import { IExtHostRpcService } from 'vs/workbench/api/common/extHostRpcService'; export interface IExtHostEditorTabs extends IExtHostEditorTabsShape { @@ -82,7 +82,7 @@ class ExtHostEditorTab { case TabInputKind.NotebookInput: return new NotebookEditorTabInput(URI.revive(this._dto.input.uri), this._dto.input.notebookType); case TabInputKind.NotebookDiffInput: - return new NotebookEditorDiffTabInput(URI.revive(this._dto.input.original), URI.revive(this._dto.input.modified), this._dto.input.notebookType); + return new NotebookDiffEditorTabInput(URI.revive(this._dto.input.original), URI.revive(this._dto.input.modified), this._dto.input.notebookType); default: return undefined; } diff --git a/src/vs/workbench/api/common/extHostTypes.ts b/src/vs/workbench/api/common/extHostTypes.ts index 794b1a89e59..3ecc45731b5 100644 --- a/src/vs/workbench/api/common/extHostTypes.ts +++ b/src/vs/workbench/api/common/extHostTypes.ts @@ -3614,7 +3614,7 @@ export class NotebookEditorTabInput { constructor(readonly uri: URI, readonly notebookType: string) { } } -export class NotebookEditorDiffTabInput { +export class NotebookDiffEditorTabInput { constructor(readonly original: URI, readonly modified: URI, readonly notebookType: string) { } } //#endregion diff --git a/src/vscode-dts/vscode.proposed.tabs.d.ts b/src/vscode-dts/vscode.proposed.tabs.d.ts index 06e28bdf8ee..1350504a46a 100644 --- a/src/vscode-dts/vscode.proposed.tabs.d.ts +++ b/src/vscode-dts/vscode.proposed.tabs.d.ts @@ -32,7 +32,7 @@ declare module 'vscode' { constructor(uri: Uri, notebookType: string); } - export class NotebookEditorDiffTabInput { + export class NotebookDiffEditorTabInput { readonly original: Uri; readonly modified: Uri; readonly notebookType: string; @@ -55,7 +55,7 @@ declare module 'vscode' { readonly viewColumn: ViewColumn; // TODO@API NAME: optional - readonly input: TextTabInput | TextDiffTabInput | CustomEditorTabInput | NotebookEditorTabInput | NotebookEditorDiffTabInput | unknown; + readonly input: TextTabInput | TextDiffTabInput | CustomEditorTabInput | NotebookEditorTabInput | NotebookDiffEditorTabInput | unknown; /** * Whether or not the tab is currently active