mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Merge from vscode 8a997f7321ae6612fc0e6eb3eac4f358a6233bfb
This commit is contained in:
@@ -28,6 +28,32 @@ import { IEnvironmentService } from 'vs/platform/environment/common/environment'
|
||||
const registry = Registry.as<IWorkbenchActionRegistry>(Extensions.WorkbenchActions);
|
||||
const viewCategory = nls.localize('view', "View");
|
||||
|
||||
// --- Close Side Bar
|
||||
|
||||
export class CloseSidebarAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.action.closeSidebar';
|
||||
static readonly LABEL = nls.localize('closeSidebar', "Close Side Bar");
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
label: string,
|
||||
@IWorkbenchLayoutService private readonly layoutService: IWorkbenchLayoutService
|
||||
) {
|
||||
super(id, label);
|
||||
|
||||
this.enabled = !!this.layoutService;
|
||||
}
|
||||
|
||||
run(): Promise<any> {
|
||||
this.layoutService.setSideBarHidden(true);
|
||||
|
||||
return Promise.resolve();
|
||||
}
|
||||
}
|
||||
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.create(CloseSidebarAction, CloseSidebarAction.ID, CloseSidebarAction.LABEL), 'View: Close Side Bar ', viewCategory);
|
||||
|
||||
// --- Toggle Activity Bar
|
||||
|
||||
export class ToggleActivityBarVisibilityAction extends Action {
|
||||
|
||||
Reference in New Issue
Block a user