move open data explorer viewlet action (#6808)

This commit is contained in:
Anthony Dresser
2019-08-19 13:56:26 -07:00
committed by GitHub
parent ed264aae81
commit 0a78a2e117
3 changed files with 21 additions and 22 deletions

View File

@@ -9,32 +9,13 @@ import { localize } from 'vs/nls';
import { ViewletRegistry, Extensions as ViewletExtensions, ViewletDescriptor, ShowViewletAction } from 'vs/workbench/browser/viewlet';
import { Registry } from 'vs/platform/registry/common/platform';
import { VIEWLET_ID } from 'sql/workbench/parts/dataExplorer/browser/dataExplorerExtensionPoint';
import { DataExplorerViewlet, DataExplorerViewletViewsContribution } from 'sql/workbench/parts/dataExplorer/browser/dataExplorerViewlet';
import { DataExplorerViewlet, DataExplorerViewletViewsContribution, OpenDataExplorerViewletAction } from 'sql/workbench/parts/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';
import { Extensions, IConfigurationRegistry } from 'vs/platform/configuration/common/configurationRegistry';
import { SyncActionDescriptor } from 'vs/platform/actions/common/actions';
import { KeyMod, KeyCode } from 'vs/base/common/keyCodes';
import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet';
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService';
// Viewlet Action
export class OpenDataExplorerViewletAction extends ShowViewletAction {
public static ID = VIEWLET_ID;
public static LABEL = localize('showDataExplorer', "Show Connections");
constructor(
id: string,
label: string,
@IViewletService viewletService: IViewletService,
@IEditorGroupsService editorGroupService: IEditorGroupsService,
@IWorkbenchLayoutService layoutService: IWorkbenchLayoutService
) {
super(id, label, VIEWLET_ID, viewletService, editorGroupService, layoutService);
}
}
// Data Explorer Viewlet
const viewletDescriptor = new ViewletDescriptor(
@@ -88,4 +69,4 @@ configurationRegistry.registerConfiguration({
'default': true
}
}
});
});

View File

@@ -27,6 +27,24 @@ import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/la
import { Registry } from 'vs/platform/registry/common/platform';
import { IMenuService, MenuId } from 'vs/platform/actions/common/actions';
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
import { ShowViewletAction } from 'vs/workbench/browser/viewlet';
import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService';
// Viewlet Action
export class OpenDataExplorerViewletAction extends ShowViewletAction {
public static ID = VIEWLET_ID;
public static LABEL = localize('showDataExplorer', "Show Connections");
constructor(
id: string,
label: string,
@IViewletService viewletService: IViewletService,
@IEditorGroupsService editorGroupService: IEditorGroupsService,
@IWorkbenchLayoutService layoutService: IWorkbenchLayoutService
) {
super(id, label, VIEWLET_ID, viewletService, editorGroupService, layoutService);
}
}
export class DataExplorerViewletViewsContribution implements IWorkbenchContribution {