change usage of view container (#9591)

This commit is contained in:
Anthony Dresser
2020-03-12 15:04:52 -07:00
committed by GitHub
parent c9170aaf0e
commit f7360771f0
2 changed files with 4 additions and 13 deletions

View File

@@ -6,9 +6,9 @@
import 'vs/css!sql/media/actionBarLabel';
import 'vs/css!./media/dataExplorer.contribution';
import { localize } from 'vs/nls';
import { ViewletRegistry, Extensions as ViewletExtensions, ViewletDescriptor } from 'vs/workbench/browser/viewlet';
import { ViewletRegistry, Extensions as ViewletExtensions } from 'vs/workbench/browser/viewlet';
import { Registry } from 'vs/platform/registry/common/platform';
import { DataExplorerViewlet, DataExplorerViewletViewsContribution, OpenDataExplorerViewletAction, VIEWLET_ID } from 'sql/workbench/contrib/dataExplorer/browser/dataExplorerViewlet';
import { DataExplorerViewletViewsContribution, OpenDataExplorerViewletAction, VIEWLET_ID } from 'sql/workbench/contrib/dataExplorer/browser/dataExplorerViewlet';
import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actions';
import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions';
import { LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle';
@@ -17,16 +17,6 @@ import { SyncActionDescriptor } from 'vs/platform/actions/common/actions';
import { KeyMod, KeyCode } from 'vs/base/common/keyCodes';
import { DataExplorerContainerExtensionHandler } from 'sql/workbench/contrib/dataExplorer/browser/dataExplorerExtensionPoint';
// Data Explorer Viewlet
const viewletDescriptor = ViewletDescriptor.create(
DataExplorerViewlet,
VIEWLET_ID,
localize('workbench.dataExplorer', "Connections"),
'dataExplorer',
0
);
Registry.as<ViewletRegistry>(ViewletExtensions.Viewlets).registerViewlet(viewletDescriptor);
Registry.as<ViewletRegistry>(ViewletExtensions.Viewlets).setDefaultViewletId(VIEWLET_ID);
const workbenchRegistry = Registry.as<IWorkbenchContributionsRegistry>(WorkbenchExtensions.Workbench);
workbenchRegistry.registerWorkbenchContribution(DataExplorerViewletViewsContribution, LifecyclePhase.Starting);

View File

@@ -156,5 +156,6 @@ export const VIEW_CONTAINER = Registry.as<IViewContainersRegistry>(ViewContainer
id: VIEWLET_ID,
name: localize('dataexplorer.name', "Connections"),
ctorDescriptor: new SyncDescriptor(DataExplorerViewPaneContainer),
icon: 'dataExplorer'
icon: 'dataExplorer',
order: 0
}, ViewContainerLocation.Sidebar);