Re-enable vscode.open tab est

This commit is contained in:
Logan Ramos
2022-03-17 10:12:00 -04:00
parent e2540eaaac
commit 1e0f8c9ba1
4 changed files with 5 additions and 6 deletions

View File

@@ -644,8 +644,11 @@ export interface IEditorTabDto {
}
export interface IExtHostEditorTabsShape {
// Accepts a whole new model
$acceptEditorTabModel(tabGroups: IEditorTabGroupDto[]): void;
// Only when group property changes (not the tabs inside)
$acceptTabGroupUpdate(groupDto: IEditorTabGroupDto): void;
// Only when tab property changes
$acceptTabUpdate(groupId: number, tabDto: IEditorTabDto): void;
}

View File

@@ -24,13 +24,11 @@ class ExtHostEditorTabGroup {
private _apiObject: vscode.TabGroup | undefined;
private _dto: IEditorTabGroupDto;
private _tabs: ExtHostEditorTab[] = [];
private _proxy: MainThreadEditorTabsShape;
private _activeTabId: string = '';
private _activeGroupIdGetter: () => number | undefined;
constructor(dto: IEditorTabGroupDto, proxy: MainThreadEditorTabsShape, activeGroupIdGetter: () => number | undefined) {
this._dto = dto;
this._proxy = proxy;
this._activeGroupIdGetter = activeGroupIdGetter;
// Construct all tabs from the given dto
for (const tabDto of dto.tabs) {
@@ -70,7 +68,6 @@ class ExtHostEditorTabGroup {
acceptGroupDtoUpdate(dto: IEditorTabGroupDto) {
this._dto = dto;
this._tabs = dto.tabs.map(tab => new ExtHostEditorTab(tab, this._proxy, this.activeTabId));
}
acceptTabDtoUpdate(dto: IEditorTabDto) {