first steps towards Tab#input

This commit is contained in:
Johannes
2022-03-17 16:43:09 +01:00
parent 72169d1bfb
commit 2f9632ec45
7 changed files with 182 additions and 31 deletions

View File

@@ -609,6 +609,51 @@ export interface ExtHostEditorInsetsShape {
//#region --- tabs model
export const enum TabInputKind {
UnknownInput,
TextInput,
TextDiffInput,
NotebookInput,
NotebookDiffInput,
CustomEditorInput
}
export interface UnknownInputDto {
kind: TabInputKind.UnknownInput;
}
export interface TextInputDto {
kind: TabInputKind.TextInput;
uri: UriComponents;
}
export interface TextDiffInputDto {
kind: TabInputKind.TextDiffInput;
original: UriComponents;
modified: UriComponents;
}
export interface NotebookInputDto {
kind: TabInputKind.NotebookInput;
notebookType: string;
uri: UriComponents;
}
export interface NotebookDiffInputDto {
kind: TabInputKind.NotebookDiffInput;
notebookType: string;
original: UriComponents;
modified: UriComponents;
}
export interface CustomInputDto {
kind: TabInputKind.CustomEditorInput;
viewType: string;
uri: UriComponents;
}
export type AnyInputDto = UnknownInputDto | TextInputDto | TextDiffInputDto | NotebookInputDto | NotebookDiffInputDto | CustomInputDto;
export interface MainThreadEditorTabsShape extends IDisposable {
// manage tabs: move, close, rearrange etc
$moveTab(tabId: string, index: number, viewColumn: EditorGroupColumn): void;
@@ -634,6 +679,7 @@ export interface IEditorTabDto {
id: string;
viewColumn: EditorGroupColumn;
label: string;
input: AnyInputDto;
resource?: UriComponents;
editorId?: string;
isActive: boolean;