@@ -18,7 +18,7 @@ import { Extensions as ViewletExtensions, PaneCompositeRegistry } from 'vs/workb
18
18
import { CustomTreeView , RawCustomTreeViewContextKey , TreeViewPane } from 'vs/workbench/browser/parts/views/treeView' ;
19
19
import { ViewPaneContainer } from 'vs/workbench/browser/parts/views/viewPaneContainer' ;
20
20
import { Extensions as WorkbenchExtensions , IWorkbenchContribution , IWorkbenchContributionsRegistry } from 'vs/workbench/common/contributions' ;
21
- import { Extensions as ViewContainerExtensions , ICustomTreeViewDescriptor , ICustomViewDescriptor , IViewContainersRegistry , IViewDescriptor , IViewsRegistry , ResolvableTreeItem , ViewContainer , ViewContainerLocation } from 'vs/workbench/common/views' ;
21
+ import { Extensions as ViewContainerExtensions , ICustomViewDescriptor , IViewContainersRegistry , IViewDescriptor , IViewsRegistry , ResolvableTreeItem , ViewContainer , ViewContainerLocation } from 'vs/workbench/common/views' ;
22
22
import { VIEWLET_ID as DEBUG } from 'vs/workbench/contrib/debug/common/debug' ;
23
23
import { VIEWLET_ID as EXPLORER } from 'vs/workbench/contrib/files/common/files' ;
24
24
import { VIEWLET_ID as REMOTE } from 'vs/workbench/contrib/remote/browser/remoteExplorer' ;
@@ -530,14 +530,14 @@ class ViewsExtensionHandler implements IWorkbenchContribution {
530
530
}
531
531
}
532
532
533
- const viewDescriptor = < ICustomTreeViewDescriptor > {
533
+ const viewDescriptor : ICustomViewDescriptor = {
534
534
type : type ,
535
535
ctorDescriptor : type === ViewType . Tree ? new SyncDescriptor ( TreeViewPane ) : new SyncDescriptor ( WebviewViewPane ) ,
536
536
id : item . id ,
537
537
name : item . name ,
538
538
when : ContextKeyExpr . deserialize ( item . when ) ,
539
539
containerIcon : icon || viewContainer ?. icon ,
540
- containerTitle : item . contextualTitle || viewContainer ? .title ,
540
+ containerTitle : item . contextualTitle || ( viewContainer && ( typeof viewContainer . title === 'string' ? viewContainer . title : viewContainer . title . value ) ) ,
541
541
canToggleVisibility : true ,
542
542
canMoveView : viewContainer ?. id !== REMOTE ,
543
543
treeView : type === ViewType . Tree ? this . instantiationService . createInstance ( CustomTreeView , item . id , item . name , extension . description . identifier . value ) : undefined ,
@@ -587,7 +587,7 @@ class ViewsExtensionHandler implements IWorkbenchContribution {
587
587
if ( removedViews . length ) {
588
588
this . viewsRegistry . deregisterViews ( removedViews , viewContainer ) ;
589
589
for ( const view of removedViews ) {
590
- const anyView = view as ICustomTreeViewDescriptor ;
590
+ const anyView = view as ICustomViewDescriptor ;
591
591
if ( anyView . treeView ) {
592
592
anyView . treeView . dispose ( ) ;
593
593
}
0 commit comments