From f862f23bd78e1c6810dd2bedc071eb41d367e30c Mon Sep 17 00:00:00 2001 From: Remi Schnekenburger Date: Wed, 5 Jun 2024 12:38:07 +0200 Subject: [PATCH] Avoid changing context key view when changing selection fixes #13375 contributed on behalf of STMicroelectronics Signed-off-by: Remi Schnekenburger --- packages/plugin-ext/src/main/browser/view/tree-views-main.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/plugin-ext/src/main/browser/view/tree-views-main.ts b/packages/plugin-ext/src/main/browser/view/tree-views-main.ts index 7809098732fbf..4d875798d5c09 100644 --- a/packages/plugin-ext/src/main/browser/view/tree-views-main.ts +++ b/packages/plugin-ext/src/main/browser/view/tree-views-main.ts @@ -24,7 +24,6 @@ import { CompositeTreeNode, WidgetManager } from '@theia/core/lib/browser'; -import { ViewContextKeyService } from './view-context-key-service'; import { Disposable, DisposableCollection } from '@theia/core'; import { TreeViewWidget, TreeViewNode, PluginTreeModel, TreeViewWidgetOptions } from './tree-view-widget'; import { PluginViewWidget } from './plugin-view-widget'; @@ -36,7 +35,6 @@ export class TreeViewsMainImpl implements TreeViewsMain, Disposable { private readonly proxy: TreeViewsExt; private readonly viewRegistry: PluginViewRegistry; - private readonly contextKeys: ViewContextKeyService; private readonly widgetManager: WidgetManager; private readonly fileContentStore: DnDFileContentStore; @@ -50,7 +48,6 @@ export class TreeViewsMainImpl implements TreeViewsMain, Disposable { this.proxy = rpc.getProxy(MAIN_RPC_CONTEXT.TREE_VIEWS_EXT); this.viewRegistry = container.get(PluginViewRegistry); - this.contextKeys = this.container.get(ViewContextKeyService); this.widgetManager = this.container.get(WidgetManager); this.fileContentStore = this.container.get(DnDFileContentStore); } @@ -197,7 +194,6 @@ export class TreeViewsMainImpl implements TreeViewsMain, Disposable { })); this.toDispose.push(treeViewWidget.model.onSelectionChanged(event => { - this.contextKeys.view.set(treeViewId); this.proxy.$setSelection(treeViewId, event.map((node: TreeViewNode) => node.id)); }));