some API proposal for open editors

This commit is contained in:
Johannes Rieken
2021-01-20 12:35:06 +01:00
parent 543af67053
commit e9263cc826
5 changed files with 126 additions and 18 deletions

View File

@@ -607,15 +607,29 @@ export interface MainThreadEditorInsetsShape extends IDisposable {
$postMessage(handle: number, value: any): Promise<boolean>;
}
export interface MainThreadEditorTabsShape extends IDisposable {
}
export interface ExtHostEditorInsetsShape {
$onDidDispose(handle: number): void;
$onDidReceiveMessage(handle: number, message: any): void;
}
//#region --- open editors model
export interface MainThreadEditorTabsShape extends IDisposable {
// manage tabs: move, close, rearrange etc
}
export interface IEditorTabDto {
group: number;
name: string;
resource: UriComponents
}
export interface IExtHostEditorTabsShape {
$acceptEditorTabs(tabs: IEditorTabDto[]): void;
}
//#endregion
export type WebviewHandle = string;
export interface WebviewPanelShowOptions {
@@ -1927,6 +1941,7 @@ export const ExtHostContext = {
ExtHostCustomEditors: createExtId<ExtHostCustomEditorsShape>('ExtHostCustomEditors'),
ExtHostWebviewViews: createExtId<ExtHostWebviewViewsShape>('ExtHostWebviewViews'),
ExtHostEditorInsets: createExtId<ExtHostEditorInsetsShape>('ExtHostEditorInsets'),
ExtHostEditorTabs: createExtId<IExtHostEditorTabsShape>('ExtHostEditorTabs'),
ExtHostProgress: createMainId<ExtHostProgressShape>('ExtHostProgress'),
ExtHostComments: createMainId<ExtHostCommentsShape>('ExtHostComments'),
ExtHostSecretState: createMainId<ExtHostSecretStateShape>('ExtHostSecretState'),