提交 2dd19f6e 编写于 作者: B Benjamin Pasero

💄

上级 06e162bb
...@@ -384,17 +384,13 @@ export class Workbench implements IPartService { ...@@ -384,17 +384,13 @@ export class Workbench implements IPartService {
} }
private createGlobalActions(): void { private createGlobalActions(): void {
const isDeveloping = !this.environmentService.isBuilt || this.environmentService.isExtensionDevelopment;
// Developer related actions // Actions registered here to adjust for developing vs built workbench
const developerCategory = localize('developer', "Developer");
const workbenchActionsRegistry = Registry.as<IWorkbenchActionRegistry>(Extensions.WorkbenchActions); const workbenchActionsRegistry = Registry.as<IWorkbenchActionRegistry>(Extensions.WorkbenchActions);
const isDeveloping = !this.environmentService.isBuilt || this.environmentService.isExtensionDevelopment;
workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ReloadWindowAction, ReloadWindowAction.ID, ReloadWindowAction.LABEL, isDeveloping ? { primary: KeyMod.CtrlCmd | KeyCode.KEY_R } : void 0), 'Reload Window'); workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ReloadWindowAction, ReloadWindowAction.ID, ReloadWindowAction.LABEL, isDeveloping ? { primary: KeyMod.CtrlCmd | KeyCode.KEY_R } : void 0), 'Reload Window');
workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ToggleDevToolsAction, ToggleDevToolsAction.ID, ToggleDevToolsAction.LABEL, isDeveloping ? { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_I, mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_I } } : void 0), 'Developer: Toggle Developer Tools', developerCategory); workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ToggleDevToolsAction, ToggleDevToolsAction.ID, ToggleDevToolsAction.LABEL, isDeveloping ? { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_I, mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_I } } : void 0), 'Developer: Toggle Developer Tools', localize('developer', "Developer"));
workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(OpenRecentAction, OpenRecentAction.ID, OpenRecentAction.LABEL, { primary: isDeveloping ? null : KeyMod.CtrlCmd | KeyCode.KEY_R, mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_R } }), 'File: Open Recent', localize('file', "File"));
// Action registered here to prevent a keybinding conflict with reload window
const fileCategory = localize('file', "File");
workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(OpenRecentAction, OpenRecentAction.ID, OpenRecentAction.LABEL, { primary: isDeveloping ? null : KeyMod.CtrlCmd | KeyCode.KEY_R, mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_R } }), 'File: Open Recent', fileCategory);
} }
private resolveEditorsToOpen(): TPromise<IResourceInputType[]> { private resolveEditorsToOpen(): TPromise<IResourceInputType[]> {
......
...@@ -10,15 +10,16 @@ import { IAction, IActionRunner } from 'vs/base/common/actions'; ...@@ -10,15 +10,16 @@ import { IAction, IActionRunner } from 'vs/base/common/actions';
import { KeyCode } from 'vs/base/common/keyCodes'; import { KeyCode } from 'vs/base/common/keyCodes';
import * as dom from 'vs/base/browser/dom'; import * as dom from 'vs/base/browser/dom';
import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent'; import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
import { SelectBox, ISelectBoxStyles } from 'vs/base/browser/ui/selectBox/selectBox'; import { SelectBox } from 'vs/base/browser/ui/selectBox/selectBox';
import { SelectActionItem, IActionItem } from 'vs/base/browser/ui/actionbar/actionbar'; import { SelectActionItem, IActionItem } from 'vs/base/browser/ui/actionbar/actionbar';
import { EventEmitter } from 'vs/base/common/eventEmitter'; import { EventEmitter } from 'vs/base/common/eventEmitter';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { ICommandService } from 'vs/platform/commands/common/commands'; import { ICommandService } from 'vs/platform/commands/common/commands';
import { IDebugService } from 'vs/workbench/parts/debug/common/debug'; import { IDebugService } from 'vs/workbench/parts/debug/common/debug';
import { IThemeService } from 'vs/platform/theme/common/themeService'; import { IThemeService } from 'vs/platform/theme/common/themeService';
import { attachSelectBoxStyler } from 'vs/platform/theme/common/styler'; import { attachSelectBoxStyler, attachStylerCallback } from 'vs/platform/theme/common/styler';
import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme'; import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme';
import { selectBorder } from "vs/platform/theme/common/colorRegistry";
const $ = dom.$; const $ = dom.$;
...@@ -115,14 +116,10 @@ export class StartDebugActionItem extends EventEmitter implements IActionItem { ...@@ -115,14 +116,10 @@ export class StartDebugActionItem extends EventEmitter implements IActionItem {
event.stopPropagation(); event.stopPropagation();
} }
})); }));
this.toDispose.push(attachSelectBoxStyler({ this.toDispose.push(attachStylerCallback(this.themeService, { selectBorder }, colors => {
style: (colors: ISelectBoxStyles) => { this.container.style.borderColor = colors.selectBorder;
if (colors.selectBorder) { selectBoxContainer.style.borderLeftColor = colors.selectBorder;
this.container.style.borderColor = colors.selectBorder.toString(); }));
selectBoxContainer.style.borderLeftColor = colors.selectBorder.toString();
}
}
}, this.themeService));
this.updateOptions(); this.updateOptions();
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册