From 46b3766c8311dcefd6cecdad8d9e34d34610bb27 Mon Sep 17 00:00:00 2001 From: Jonah Iden Date: Fri, 24 May 2024 13:48:08 +0200 Subject: [PATCH 1/8] improved vsocde tabApi Signed-off-by: Jonah Iden --- .../src/main/browser/tabs/tabs-main.ts | 45 ++++++++++++++----- packages/plugin-ext/src/plugin/tabs.ts | 9 +++- 2 files changed, 42 insertions(+), 12 deletions(-) diff --git a/packages/plugin-ext/src/main/browser/tabs/tabs-main.ts b/packages/plugin-ext/src/main/browser/tabs/tabs-main.ts index 5375409373fb8..625f2c5451e3b 100644 --- a/packages/plugin-ext/src/main/browser/tabs/tabs-main.ts +++ b/packages/plugin-ext/src/main/browser/tabs/tabs-main.ts @@ -24,6 +24,7 @@ import { MonacoDiffEditor } from '@theia/monaco/lib/browser/monaco-diff-editor'; import { toUriComponents } from '../hierarchy/hierarchy-types-converters'; import { TerminalWidget } from '@theia/terminal/lib/browser/base/terminal-widget'; import { DisposableCollection } from '@theia/core'; +import { NotebookEditorWidget } from '@theia/notebook/lib/browser'; interface TabInfo { tab: TabDto; @@ -47,6 +48,13 @@ export class TabsMainImpl implements TabsMain, Disposable { private tabGroupChanged: boolean = false; + private readonly defaultTabGroup: TabGroupDto = { + groupId: 0, + tabs: [], + isActive: true, + viewColumn: 0 + }; + constructor( rpc: RPCProtocol, container: interfaces.Container @@ -54,6 +62,7 @@ export class TabsMainImpl implements TabsMain, Disposable { this.proxy = rpc.getProxy(MAIN_RPC_CONTEXT.TABS_EXT); this.applicationShell = container.get(ApplicationShell); + this.applicationShell.getLayoutData() this.createTabsModel(); const tabBars = this.applicationShell.mainPanel.tabBars(); @@ -64,6 +73,7 @@ export class TabsMainImpl implements TabsMain, Disposable { this.toDisposeOnDestroy.push( this.applicationShell.mainPanelRenderer.onDidCreateTabBar(tabBar => { this.attachListenersToTabBar(tabBar); + this.createTabsModel(tabBar); this.onTabGroupCreated(tabBar); }) ); @@ -99,16 +109,22 @@ export class TabsMainImpl implements TabsMain, Disposable { }); } - protected createTabsModel(): void { + protected createTabsModel(newTabbar?: TabBar): void { + if (this.applicationShell.mainAreaTabBars.length === 0) { + this.proxy.$acceptEditorTabModel([this.defaultTabGroup]); + return; + } const newTabGroupModel = new Map, TabGroupDto>(); this.tabInfoLookup.clear(); this.disposableTabBarListeners.dispose(); - this.applicationShell.mainAreaTabBars.forEach(tabBar => { - this.attachListenersToTabBar(tabBar); - const groupDto = this.createTabGroupDto(tabBar); - tabBar.titles.forEach((title, index) => this.tabInfoLookup.set(title, { group: groupDto, tab: groupDto.tabs[index], tabIndex: index })); - newTabGroupModel.set(tabBar, groupDto); - }); + this.applicationShell.mainAreaTabBars + .concat(newTabbar ? [newTabbar] : []) + .forEach((tabBar, i) => { + this.attachListenersToTabBar(tabBar); + const groupDto = this.createTabGroupDto(tabBar, i); + tabBar.titles.forEach((title, index) => this.tabInfoLookup.set(title, { group: groupDto, tab: groupDto.tabs[index], tabIndex: index })); + newTabGroupModel.set(tabBar, groupDto); + }); if (newTabGroupModel.size > 0 && Array.from(newTabGroupModel.values()).indexOf(this.currentActiveGroup) < 0) { this.currentActiveGroup = this.tabInfoLookup.get(this.applicationShell.mainPanel.currentTitle!)?.group ?? newTabGroupModel.values().next().value; this.currentActiveGroup.isActive = true; @@ -134,15 +150,15 @@ export class TabsMainImpl implements TabsMain, Disposable { return `${groupId}~${tabTitle.owner.id}`; } - protected createTabGroupDto(tabBar: TabBar): TabGroupDto { - const oldDto = this.tabGroupModel.get(tabBar); + protected createTabGroupDto(tabBar: TabBar, index: number): TabGroupDto { + const oldDto = index === 0 ? this.defaultTabGroup : this.tabGroupModel.get(tabBar); const groupId = oldDto?.groupId ?? this.groupIdCounter++; const tabs = tabBar.titles.map(title => this.createTabDto(title, groupId)); return { groupId, tabs, isActive: false, - viewColumn: 1 + viewColumn: this.applicationShell.allTabBars.indexOf(tabBar) }; } @@ -182,6 +198,12 @@ export class TabsMainImpl implements TabsMain, Disposable { return { kind: TabInputKind.TerminalEditorInput }; + } else if (widget instanceof NotebookEditorWidget) { + return { + kind: TabInputKind.NotebookInput, + notebookType: widget.notebookType, + uri: toUriComponents(widget.model?.uri.toString() ?? '') + } } return { kind: TabInputKind.UnknownInput }; @@ -232,6 +254,9 @@ export class TabsMainImpl implements TabsMain, Disposable { } const oldTabDto = tabInfo.tab; const newTabDto = this.createTabDto(title, tabInfo.group.groupId); + if (!oldTabDto.isActive && newTabDto.isActive) { + this.currentActiveGroup.tabs.filter(tab => tab.isActive).map(tab => tab.isActive = false); + } if (newTabDto.isActive && !tabInfo.group.isActive) { tabInfo.group.isActive = true; this.currentActiveGroup.isActive = false; diff --git a/packages/plugin-ext/src/plugin/tabs.ts b/packages/plugin-ext/src/plugin/tabs.ts index a1a4761632371..80a263b778bf3 100644 --- a/packages/plugin-ext/src/plugin/tabs.ts +++ b/packages/plugin-ext/src/plugin/tabs.ts @@ -325,8 +325,13 @@ export class TabsExtImpl implements TabsExt { this.activeGroupId = activeTabGroupId; } } - this.onDidChangeTabGroups.fire(Object.freeze({ opened, closed, changed })); - this.onDidChangeTabs.fire({ opened: tabsOpened, changed: [], closed: [] }); + + if (closed.length > 0 || opened.length > 0 || changed.length > 0) { + this.onDidChangeTabGroups.fire(Object.freeze({ opened, closed, changed })); + } + if (tabsOpened.length > 0) { + this.onDidChangeTabs.fire({ opened: tabsOpened, changed: [], closed: [] }); + } } $acceptTabGroupUpdate(groupDto: TabGroupDto): void { From b31046aa82a57e8be5a480375caaeed8ca309807 Mon Sep 17 00:00:00 2001 From: Jonah Iden Date: Fri, 24 May 2024 14:11:26 +0200 Subject: [PATCH 2/8] lint Signed-off-by: Jonah Iden --- packages/plugin-ext/src/main/browser/tabs/tabs-main.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/plugin-ext/src/main/browser/tabs/tabs-main.ts b/packages/plugin-ext/src/main/browser/tabs/tabs-main.ts index 625f2c5451e3b..30a8145789ed1 100644 --- a/packages/plugin-ext/src/main/browser/tabs/tabs-main.ts +++ b/packages/plugin-ext/src/main/browser/tabs/tabs-main.ts @@ -62,7 +62,7 @@ export class TabsMainImpl implements TabsMain, Disposable { this.proxy = rpc.getProxy(MAIN_RPC_CONTEXT.TABS_EXT); this.applicationShell = container.get(ApplicationShell); - this.applicationShell.getLayoutData() + this.applicationShell.getLayoutData(); this.createTabsModel(); const tabBars = this.applicationShell.mainPanel.tabBars(); @@ -203,7 +203,7 @@ export class TabsMainImpl implements TabsMain, Disposable { kind: TabInputKind.NotebookInput, notebookType: widget.notebookType, uri: toUriComponents(widget.model?.uri.toString() ?? '') - } + }; } return { kind: TabInputKind.UnknownInput }; From 348a99666b115eedfc95f4867c799e3634689aa1 Mon Sep 17 00:00:00 2001 From: Jonah Iden Date: Mon, 27 May 2024 08:53:49 +0200 Subject: [PATCH 3/8] review changes Signed-off-by: Jonah Iden --- packages/plugin-ext/src/main/browser/tabs/tabs-main.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/plugin-ext/src/main/browser/tabs/tabs-main.ts b/packages/plugin-ext/src/main/browser/tabs/tabs-main.ts index 30a8145789ed1..18ca36afbb2e8 100644 --- a/packages/plugin-ext/src/main/browser/tabs/tabs-main.ts +++ b/packages/plugin-ext/src/main/browser/tabs/tabs-main.ts @@ -62,7 +62,6 @@ export class TabsMainImpl implements TabsMain, Disposable { this.proxy = rpc.getProxy(MAIN_RPC_CONTEXT.TABS_EXT); this.applicationShell = container.get(ApplicationShell); - this.applicationShell.getLayoutData(); this.createTabsModel(); const tabBars = this.applicationShell.mainPanel.tabBars(); @@ -73,7 +72,6 @@ export class TabsMainImpl implements TabsMain, Disposable { this.toDisposeOnDestroy.push( this.applicationShell.mainPanelRenderer.onDidCreateTabBar(tabBar => { this.attachListenersToTabBar(tabBar); - this.createTabsModel(tabBar); this.onTabGroupCreated(tabBar); }) ); @@ -109,7 +107,7 @@ export class TabsMainImpl implements TabsMain, Disposable { }); } - protected createTabsModel(newTabbar?: TabBar): void { + protected createTabsModel(): void { if (this.applicationShell.mainAreaTabBars.length === 0) { this.proxy.$acceptEditorTabModel([this.defaultTabGroup]); return; @@ -118,7 +116,6 @@ export class TabsMainImpl implements TabsMain, Disposable { this.tabInfoLookup.clear(); this.disposableTabBarListeners.dispose(); this.applicationShell.mainAreaTabBars - .concat(newTabbar ? [newTabbar] : []) .forEach((tabBar, i) => { this.attachListenersToTabBar(tabBar); const groupDto = this.createTabGroupDto(tabBar, i); @@ -255,7 +252,7 @@ export class TabsMainImpl implements TabsMain, Disposable { const oldTabDto = tabInfo.tab; const newTabDto = this.createTabDto(title, tabInfo.group.groupId); if (!oldTabDto.isActive && newTabDto.isActive) { - this.currentActiveGroup.tabs.filter(tab => tab.isActive).map(tab => tab.isActive = false); + this.currentActiveGroup.tabs.filter(tab => tab.isActive).forEach(tab => tab.isActive = false); } if (newTabDto.isActive && !tabInfo.group.isActive) { tabInfo.group.isActive = true; From 933f3cf6bc47cf0e69c362d42e4a7e2494a2d73c Mon Sep 17 00:00:00 2001 From: Jonah Iden Date: Mon, 27 May 2024 10:02:10 +0200 Subject: [PATCH 4/8] use view collumn service and removed workaround Signed-off-by: Jonah Iden --- examples/api-tests/src/typescript.spec.js | 1 - packages/core/src/browser/frontend-application-module.ts | 3 +++ .../src/browser/shell}/view-column-service.ts | 0 .../src/main/browser/plugin-ext-frontend-module.ts | 3 --- packages/plugin-ext/src/main/browser/tabs/tabs-main.ts | 9 ++++++--- packages/plugin-ext/src/main/browser/webviews-main.ts | 2 +- packages/plugin-ext/tsconfig.json | 3 ++- 7 files changed, 12 insertions(+), 9 deletions(-) rename packages/{plugin-ext/src/main/browser => core/src/browser/shell}/view-column-service.ts (100%) diff --git a/examples/api-tests/src/typescript.spec.js b/examples/api-tests/src/typescript.spec.js index a2432070f1f77..be332b727d3c7 100644 --- a/examples/api-tests/src/typescript.spec.js +++ b/examples/api-tests/src/typescript.spec.js @@ -103,7 +103,6 @@ describe('TypeScript', function () { const editorWidget = widget instanceof EditorWidget ? widget : undefined; const editor = MonacoEditor.get(editorWidget); assert.isDefined(editor); - await timeout(1000); // workaround for https://github.com/eclipse-theia/theia/issues/13679 // wait till tsserver is running, see: // https://github.com/microsoft/vscode/blob/93cbbc5cae50e9f5f5046343c751b6d010468200/extensions/typescript-language-features/src/extension.ts#L98-L103 // await waitForAnimation(() => contextKeyService.match('typescript.isManagedFile')); diff --git a/packages/core/src/browser/frontend-application-module.ts b/packages/core/src/browser/frontend-application-module.ts index bc21b7277c135..3c35877a40668 100644 --- a/packages/core/src/browser/frontend-application-module.ts +++ b/packages/core/src/browser/frontend-application-module.ts @@ -141,6 +141,7 @@ import { AdditionalViewsMenuWidget, AdditionalViewsMenuWidgetFactory } from './s import { LanguageIconLabelProvider } from './language-icon-provider'; import { bindTreePreferences } from './tree'; import { OpenWithService } from './open-with-service'; +import { ViewColumnService } from './shell/view-column-service'; export { bindResourceProvider, bindMessageService, bindPreferenceService }; @@ -462,4 +463,6 @@ export const frontendApplicationModule = new ContainerModule((bind, _unbind, _is bind(FrontendApplicationContribution).toService(StylingService); bind(SecondaryWindowHandler).toSelf().inSingletonScope(); + + bind(ViewColumnService).toSelf().inSingletonScope(); }); diff --git a/packages/plugin-ext/src/main/browser/view-column-service.ts b/packages/core/src/browser/shell/view-column-service.ts similarity index 100% rename from packages/plugin-ext/src/main/browser/view-column-service.ts rename to packages/core/src/browser/shell/view-column-service.ts diff --git a/packages/plugin-ext/src/main/browser/plugin-ext-frontend-module.ts b/packages/plugin-ext/src/main/browser/plugin-ext-frontend-module.ts index 10c4a6f29b79c..dc8d2bfdaf5c8 100644 --- a/packages/plugin-ext/src/main/browser/plugin-ext-frontend-module.ts +++ b/packages/plugin-ext/src/main/browser/plugin-ext-frontend-module.ts @@ -47,7 +47,6 @@ import { PluginDebugService } from './debug/plugin-debug-service'; import { DebugService } from '@theia/debug/lib/common/debug-service'; import { PluginSharedStyle } from './plugin-shared-style'; import { SelectionProviderCommandContribution } from './selection-provider-command'; -import { ViewColumnService } from './view-column-service'; import { ViewContextKeyService } from './view/view-context-key-service'; import { PluginViewWidget, PluginViewWidgetIdentifier } from './view/plugin-view-widget'; import { TreeViewWidgetOptions, VIEW_ITEM_CONTEXT_MENU, PluginTree, TreeViewWidget, PluginTreeModel } from './view/tree-view-widget'; @@ -244,8 +243,6 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => { bind(PluginDebugSessionContributionRegistry).toSelf().inSingletonScope(); rebind(DebugSessionContributionRegistry).toService(PluginDebugSessionContributionRegistry); - bind(ViewColumnService).toSelf().inSingletonScope(); - bind(CommentsService).to(PluginCommentService).inSingletonScope(); bind(CommentingRangeDecorator).toSelf().inSingletonScope(); bind(CommentsContribution).toSelf().inSingletonScope(); diff --git a/packages/plugin-ext/src/main/browser/tabs/tabs-main.ts b/packages/plugin-ext/src/main/browser/tabs/tabs-main.ts index 18ca36afbb2e8..e229a110cd851 100644 --- a/packages/plugin-ext/src/main/browser/tabs/tabs-main.ts +++ b/packages/plugin-ext/src/main/browser/tabs/tabs-main.ts @@ -23,8 +23,9 @@ import { Disposable } from '@theia/core/shared/vscode-languageserver-protocol'; import { MonacoDiffEditor } from '@theia/monaco/lib/browser/monaco-diff-editor'; import { toUriComponents } from '../hierarchy/hierarchy-types-converters'; import { TerminalWidget } from '@theia/terminal/lib/browser/base/terminal-widget'; -import { DisposableCollection } from '@theia/core'; +import { DisposableCollection, ViewColumn } from '@theia/core'; import { NotebookEditorWidget } from '@theia/notebook/lib/browser'; +import { ViewColumnService } from '@theia/core/src/browser/shell/view-column-service'; interface TabInfo { tab: TabDto; @@ -47,12 +48,13 @@ export class TabsMainImpl implements TabsMain, Disposable { private currentActiveGroup: TabGroupDto; private tabGroupChanged: boolean = false; + private viewColumnService: ViewColumnService; private readonly defaultTabGroup: TabGroupDto = { groupId: 0, tabs: [], isActive: true, - viewColumn: 0 + viewColumn: ViewColumn.Active }; constructor( @@ -62,6 +64,7 @@ export class TabsMainImpl implements TabsMain, Disposable { this.proxy = rpc.getProxy(MAIN_RPC_CONTEXT.TABS_EXT); this.applicationShell = container.get(ApplicationShell); + this.viewColumnService = container.get(ViewColumnService); this.createTabsModel(); const tabBars = this.applicationShell.mainPanel.tabBars(); @@ -155,7 +158,7 @@ export class TabsMainImpl implements TabsMain, Disposable { groupId, tabs, isActive: false, - viewColumn: this.applicationShell.allTabBars.indexOf(tabBar) + viewColumn: this.viewColumnService.getViewColumn(tabBar.id) ?? this.applicationShell.allTabBars.indexOf(tabBar); }; } diff --git a/packages/plugin-ext/src/main/browser/webviews-main.ts b/packages/plugin-ext/src/main/browser/webviews-main.ts index cf0f319950ba4..862010101dbf1 100644 --- a/packages/plugin-ext/src/main/browser/webviews-main.ts +++ b/packages/plugin-ext/src/main/browser/webviews-main.ts @@ -23,7 +23,7 @@ import { ViewBadge, WebviewOptions, WebviewPanelOptions, WebviewPanelShowOptions import { ApplicationShell } from '@theia/core/lib/browser/shell/application-shell'; import { WebviewWidget, WebviewWidgetIdentifier } from './webview/webview'; import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable'; -import { ViewColumnService } from './view-column-service'; +import { ViewColumnService } from '@theia/core/lib/browser/shell/view-column-service'; import { WidgetManager } from '@theia/core/lib/browser/widget-manager'; import { JSONExt } from '@theia/core/shared/@phosphor/coreutils'; import { Mutable } from '@theia/core/lib/common/types'; diff --git a/packages/plugin-ext/tsconfig.json b/packages/plugin-ext/tsconfig.json index b43a5295a5ad1..917388d41dc00 100644 --- a/packages/plugin-ext/tsconfig.json +++ b/packages/plugin-ext/tsconfig.json @@ -11,7 +11,8 @@ ] }, "include": [ - "src" + "src", + "../core/src/browser/shell/view-column-service.ts" ], "references": [ { From c0afcfa6f6743b14901d66b01840be99944318dc Mon Sep 17 00:00:00 2001 From: Jonah Iden Date: Mon, 27 May 2024 10:08:13 +0200 Subject: [PATCH 5/8] fixed build Signed-off-by: Jonah Iden --- packages/plugin-ext/tsconfig.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/plugin-ext/tsconfig.json b/packages/plugin-ext/tsconfig.json index 917388d41dc00..b43a5295a5ad1 100644 --- a/packages/plugin-ext/tsconfig.json +++ b/packages/plugin-ext/tsconfig.json @@ -11,8 +11,7 @@ ] }, "include": [ - "src", - "../core/src/browser/shell/view-column-service.ts" + "src" ], "references": [ { From 3c22d1d57c51947d33961f7426ad2f03aa38195d Mon Sep 17 00:00:00 2001 From: Mark Sujew Date: Mon, 27 May 2024 09:37:23 +0000 Subject: [PATCH 6/8] Fix build errors --- packages/core/src/browser/shell/view-column-service.ts | 10 +++++----- packages/plugin-ext/src/main/browser/tabs/tabs-main.ts | 6 ++++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/packages/core/src/browser/shell/view-column-service.ts b/packages/core/src/browser/shell/view-column-service.ts index a44a18b6482f3..16db95bc190d8 100644 --- a/packages/core/src/browser/shell/view-column-service.ts +++ b/packages/core/src/browser/shell/view-column-service.ts @@ -14,11 +14,11 @@ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0 // ***************************************************************************** -import { injectable, inject } from '@theia/core/shared/inversify'; -import { Emitter, Event } from '@theia/core/lib/common/event'; -import { ApplicationShell } from '@theia/core/lib/browser/shell/application-shell'; -import { toArray } from '@theia/core/shared/@phosphor/algorithm'; -import { TabBar, Widget } from '@theia/core/shared/@phosphor/widgets'; +import { injectable, inject } from 'inversify'; +import { Emitter, Event } from '../../common/event'; +import { ApplicationShell } from './application-shell'; +import { toArray } from '@phosphor/algorithm'; +import { TabBar, Widget } from '@phosphor/widgets'; @injectable() export class ViewColumnService { diff --git a/packages/plugin-ext/src/main/browser/tabs/tabs-main.ts b/packages/plugin-ext/src/main/browser/tabs/tabs-main.ts index e229a110cd851..e627f708f6c8c 100644 --- a/packages/plugin-ext/src/main/browser/tabs/tabs-main.ts +++ b/packages/plugin-ext/src/main/browser/tabs/tabs-main.ts @@ -25,7 +25,7 @@ import { toUriComponents } from '../hierarchy/hierarchy-types-converters'; import { TerminalWidget } from '@theia/terminal/lib/browser/base/terminal-widget'; import { DisposableCollection, ViewColumn } from '@theia/core'; import { NotebookEditorWidget } from '@theia/notebook/lib/browser'; -import { ViewColumnService } from '@theia/core/src/browser/shell/view-column-service'; +import { ViewColumnService } from '@theia/core/lib/browser/shell/view-column-service'; interface TabInfo { tab: TabDto; @@ -154,11 +154,13 @@ export class TabsMainImpl implements TabsMain, Disposable { const oldDto = index === 0 ? this.defaultTabGroup : this.tabGroupModel.get(tabBar); const groupId = oldDto?.groupId ?? this.groupIdCounter++; const tabs = tabBar.titles.map(title => this.createTabDto(title, groupId)); + const viewColumn = this.viewColumnService.getViewColumn(tabBar.id) + ?? this.applicationShell.allTabBars.indexOf(tabBar); return { groupId, tabs, isActive: false, - viewColumn: this.viewColumnService.getViewColumn(tabBar.id) ?? this.applicationShell.allTabBars.indexOf(tabBar); + viewColumn }; } From 183798e2c4d4e719e2a55e2fb6597bcc5bce27c4 Mon Sep 17 00:00:00 2001 From: Mark Sujew Date: Wed, 29 May 2024 18:04:44 +0200 Subject: [PATCH 7/8] Fix incorrect view column index `-1` --- examples/api-tests/src/typescript.spec.js | 1 + packages/plugin-ext/src/main/browser/tabs/tabs-main.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/api-tests/src/typescript.spec.js b/examples/api-tests/src/typescript.spec.js index be332b727d3c7..4c80769b39864 100644 --- a/examples/api-tests/src/typescript.spec.js +++ b/examples/api-tests/src/typescript.spec.js @@ -103,6 +103,7 @@ describe('TypeScript', function () { const editorWidget = widget instanceof EditorWidget ? widget : undefined; const editor = MonacoEditor.get(editorWidget); assert.isDefined(editor); + await timeout(1000); // wait till tsserver is running, see: // https://github.com/microsoft/vscode/blob/93cbbc5cae50e9f5f5046343c751b6d010468200/extensions/typescript-language-features/src/extension.ts#L98-L103 // await waitForAnimation(() => contextKeyService.match('typescript.isManagedFile')); diff --git a/packages/plugin-ext/src/main/browser/tabs/tabs-main.ts b/packages/plugin-ext/src/main/browser/tabs/tabs-main.ts index e627f708f6c8c..bd8f83885aad4 100644 --- a/packages/plugin-ext/src/main/browser/tabs/tabs-main.ts +++ b/packages/plugin-ext/src/main/browser/tabs/tabs-main.ts @@ -23,7 +23,7 @@ import { Disposable } from '@theia/core/shared/vscode-languageserver-protocol'; import { MonacoDiffEditor } from '@theia/monaco/lib/browser/monaco-diff-editor'; import { toUriComponents } from '../hierarchy/hierarchy-types-converters'; import { TerminalWidget } from '@theia/terminal/lib/browser/base/terminal-widget'; -import { DisposableCollection, ViewColumn } from '@theia/core'; +import { DisposableCollection } from '@theia/core'; import { NotebookEditorWidget } from '@theia/notebook/lib/browser'; import { ViewColumnService } from '@theia/core/lib/browser/shell/view-column-service'; @@ -54,7 +54,7 @@ export class TabsMainImpl implements TabsMain, Disposable { groupId: 0, tabs: [], isActive: true, - viewColumn: ViewColumn.Active + viewColumn: 0 }; constructor( From 736ff9013f84cb4757e509395151b6df3c7f6e0a Mon Sep 17 00:00:00 2001 From: Mark Sujew Date: Thu, 30 May 2024 13:11:18 +0200 Subject: [PATCH 8/8] Add issue reference --- examples/api-tests/src/typescript.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/api-tests/src/typescript.spec.js b/examples/api-tests/src/typescript.spec.js index 4c80769b39864..a2432070f1f77 100644 --- a/examples/api-tests/src/typescript.spec.js +++ b/examples/api-tests/src/typescript.spec.js @@ -103,7 +103,7 @@ describe('TypeScript', function () { const editorWidget = widget instanceof EditorWidget ? widget : undefined; const editor = MonacoEditor.get(editorWidget); assert.isDefined(editor); - await timeout(1000); + await timeout(1000); // workaround for https://github.com/eclipse-theia/theia/issues/13679 // wait till tsserver is running, see: // https://github.com/microsoft/vscode/blob/93cbbc5cae50e9f5f5046343c751b6d010468200/extensions/typescript-language-features/src/extension.ts#L98-L103 // await waitForAnimation(() => contextKeyService.match('typescript.isManagedFile'));