IKeybindingService2 -> IKeybindingService
This commit is contained in:
parent
4cba117727
commit
a9701d8651
|
@ -9,7 +9,7 @@ import {IDisposable, dispose} from 'vs/base/common/lifecycle';
|
|||
import {IContextViewService} from 'vs/platform/contextview/browser/contextView';
|
||||
import {IInstantiationService} from 'vs/platform/instantiation/common/instantiation';
|
||||
import {ICommandService} from 'vs/platform/commands/common/commands';
|
||||
import {IKeybindingService2} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IKeybindingService} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IContextKey, IContextKeyService} from 'vs/platform/contextkey/common/contextkey';
|
||||
import {ICommandHandler} from 'vs/platform/commands/common/commands';
|
||||
import {ITelemetryService} from 'vs/platform/telemetry/common/telemetry';
|
||||
|
@ -71,15 +71,15 @@ export class StandaloneEditor extends CodeEditorWidget implements IStandaloneCod
|
|||
@ICodeEditorService codeEditorService: ICodeEditorService,
|
||||
@ICommandService commandService: ICommandService,
|
||||
@IContextKeyService contextKeyService: IContextKeyService,
|
||||
@IKeybindingService2 keybindingService2: IKeybindingService2,
|
||||
@IKeybindingService keybindingService: IKeybindingService,
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@IContextViewService contextViewService: IContextViewService
|
||||
) {
|
||||
options = options || {};
|
||||
super(domElement, options, instantiationService, codeEditorService, commandService, contextKeyService.createScoped(domElement), telemetryService);
|
||||
|
||||
if (keybindingService2 instanceof StandaloneKeybindingService2) {
|
||||
this._standaloneKeybindingService = keybindingService2;
|
||||
if (keybindingService instanceof StandaloneKeybindingService2) {
|
||||
this._standaloneKeybindingService = keybindingService;
|
||||
}
|
||||
|
||||
this._contextViewService = <IEditorContextViewService>contextViewService;
|
||||
|
@ -174,14 +174,14 @@ export class StandaloneDiffEditor extends DiffEditorWidget implements IStandalon
|
|||
toDispose: IDisposable[],
|
||||
@IInstantiationService instantiationService: IInstantiationService,
|
||||
@IContextKeyService contextKeyService: IContextKeyService,
|
||||
@IKeybindingService2 keybindingService2: IKeybindingService2,
|
||||
@IKeybindingService keybindingService: IKeybindingService,
|
||||
@IContextViewService contextViewService: IContextViewService,
|
||||
@IEditorWorkerService editorWorkerService: IEditorWorkerService
|
||||
) {
|
||||
super(domElement, options, editorWorkerService, contextKeyService, instantiationService);
|
||||
|
||||
if (keybindingService2 instanceof StandaloneKeybindingService2) {
|
||||
this._standaloneKeybindingService = keybindingService2;
|
||||
if (keybindingService instanceof StandaloneKeybindingService2) {
|
||||
this._standaloneKeybindingService = keybindingService;
|
||||
}
|
||||
|
||||
this._contextViewService = <IEditorContextViewService>contextViewService;
|
||||
|
|
|
@ -20,7 +20,7 @@ import {ServiceCollection} from 'vs/platform/instantiation/common/serviceCollect
|
|||
import {ICommandService} from 'vs/platform/commands/common/commands';
|
||||
import {CommandService} from 'vs/platform/commands/common/commandService';
|
||||
import {IOpenerService} from 'vs/platform/opener/common/opener';
|
||||
import {IKeybindingService2} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IKeybindingService} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IContextKeyService} from 'vs/platform/contextkey/common/contextkey';
|
||||
import {MarkerService} from 'vs/platform/markers/common/markerService';
|
||||
import {IMarkerService} from 'vs/platform/markers/common/markers';
|
||||
|
@ -98,7 +98,7 @@ export interface IEditorOverrideServices {
|
|||
/**
|
||||
* @internal
|
||||
*/
|
||||
keybindingService2?:IKeybindingService2;
|
||||
keybindingService?:IKeybindingService;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
|
@ -203,10 +203,10 @@ export function ensureDynamicPlatformServices(domElement:HTMLElement, services:
|
|||
} else {
|
||||
contextKeyService = services.contextKeyService;
|
||||
}
|
||||
if (typeof services.keybindingService2 === 'undefined') {
|
||||
let keybindingService2 = new StandaloneKeybindingService2(contextKeyService, services.commandService, services.messageService, domElement);
|
||||
r.push(keybindingService2);
|
||||
services.keybindingService2 = keybindingService2;
|
||||
if (typeof services.keybindingService === 'undefined') {
|
||||
let keybindingService = new StandaloneKeybindingService2(contextKeyService, services.commandService, services.messageService, domElement);
|
||||
r.push(keybindingService);
|
||||
services.keybindingService = keybindingService;
|
||||
}
|
||||
|
||||
let contextViewService:IEditorContextViewService;
|
||||
|
|
|
@ -15,7 +15,7 @@ import {renderHtml} from 'vs/base/browser/htmlContentRenderer';
|
|||
import {StyleMutator} from 'vs/base/browser/styleMutator';
|
||||
import {Widget} from 'vs/base/browser/ui/widget';
|
||||
import {ServicesAccessor} from 'vs/platform/instantiation/common/instantiation';
|
||||
import {IKeybindingService2} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IKeybindingService} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {RawContextKey, IContextKey, IContextKeyService} from 'vs/platform/contextkey/common/contextkey';
|
||||
import {KeybindingsRegistry} from 'vs/platform/keybinding/common/keybindingsRegistry';
|
||||
import {GlobalScreenReaderNVDA} from 'vs/editor/common/config/commonEditorConfig';
|
||||
|
@ -42,12 +42,12 @@ class AccessibilityHelpController extends Disposable implements IEditorContribut
|
|||
constructor(
|
||||
editor:ICodeEditor,
|
||||
@IContextKeyService contextKeyService: IContextKeyService,
|
||||
@IKeybindingService2 keybindingService2: IKeybindingService2
|
||||
@IKeybindingService keybindingService: IKeybindingService
|
||||
) {
|
||||
super();
|
||||
|
||||
this._editor = editor;
|
||||
this._widget = this._register(new AccessibilityHelpWidget(this._editor, contextKeyService, keybindingService2));
|
||||
this._widget = this._register(new AccessibilityHelpWidget(this._editor, contextKeyService, keybindingService));
|
||||
}
|
||||
|
||||
public getId(): string {
|
||||
|
@ -70,16 +70,16 @@ class AccessibilityHelpWidget extends Widget implements IOverlayWidget {
|
|||
private static HEIGHT = 300;
|
||||
|
||||
private _editor: ICodeEditor;
|
||||
private _keybindingService2: IKeybindingService2;
|
||||
private _keybindingService: IKeybindingService;
|
||||
private _domNode: HTMLElement;
|
||||
private _isVisible: boolean;
|
||||
private _isVisibleKey: IContextKey<boolean>;
|
||||
|
||||
constructor(editor:ICodeEditor, contextKeyService: IContextKeyService, keybindingService2: IKeybindingService2) {
|
||||
constructor(editor:ICodeEditor, contextKeyService: IContextKeyService, keybindingService: IKeybindingService) {
|
||||
super();
|
||||
|
||||
this._editor = editor;
|
||||
this._keybindingService2 = keybindingService2;
|
||||
this._keybindingService = keybindingService;
|
||||
this._isVisibleKey = CONTEXT_ACCESSIBILITY_WIDGET_VISIBLE.bindTo(contextKeyService);
|
||||
|
||||
this._domNode = document.createElement('div');
|
||||
|
@ -138,9 +138,9 @@ class AccessibilityHelpWidget extends Widget implements IOverlayWidget {
|
|||
}
|
||||
|
||||
private _descriptionForCommand(commandId:string, msg:string, noKbMsg:string): string {
|
||||
let keybindings = this._keybindingService2.lookupKeybindings(commandId);
|
||||
let keybindings = this._keybindingService.lookupKeybindings(commandId);
|
||||
if (keybindings.length > 0) {
|
||||
return strings.format(msg, this._keybindingService2.getAriaLabelFor(keybindings[0]));
|
||||
return strings.format(msg, this._keybindingService.getAriaLabelFor(keybindings[0]));
|
||||
}
|
||||
return strings.format(noKbMsg, commandId);
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ import * as dom from 'vs/base/browser/dom';
|
|||
import {IKeyboardEvent} from 'vs/base/browser/keyboardEvent';
|
||||
import {ActionItem, Separator} from 'vs/base/browser/ui/actionbar/actionbar';
|
||||
import {IContextMenuService, IContextViewService} from 'vs/platform/contextview/browser/contextView';
|
||||
import {IKeybindingService2} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IKeybindingService} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IContextKeyService} from 'vs/platform/contextkey/common/contextkey';
|
||||
import {IMenuService, IMenu, MenuId} from 'vs/platform/actions/common/actions';
|
||||
import {ICommonCodeEditor, IEditorContribution, MouseTargetType, EditorContextKeys} from 'vs/editor/common/editorCommon';
|
||||
|
@ -44,7 +44,7 @@ class ContextMenuController implements IEditorContribution {
|
|||
@IContextMenuService private _contextMenuService: IContextMenuService,
|
||||
@IContextViewService private _contextViewService: IContextViewService,
|
||||
@IContextKeyService private _contextKeyService: IContextKeyService,
|
||||
@IKeybindingService2 private _keybindingService2: IKeybindingService2,
|
||||
@IKeybindingService private _keybindingService: IKeybindingService,
|
||||
@IMenuService private _menuService: IMenuService
|
||||
) {
|
||||
this._editor = editor;
|
||||
|
@ -177,7 +177,7 @@ class ContextMenuController implements IEditorContribution {
|
|||
getActionItem: (action) => {
|
||||
var keybinding = this._keybindingFor(action);
|
||||
if (keybinding) {
|
||||
return new ActionItem(action, action, { label: true, keybinding: this._keybindingService2.getLabelFor(keybinding) });
|
||||
return new ActionItem(action, action, { label: true, keybinding: this._keybindingService.getLabelFor(keybinding) });
|
||||
}
|
||||
|
||||
var customActionItem = <any>action;
|
||||
|
@ -204,7 +204,7 @@ class ContextMenuController implements IEditorContribution {
|
|||
}
|
||||
|
||||
private _keybindingFor(action: IAction): Keybinding {
|
||||
var opts = this._keybindingService2.lookupKeybindings(action.id);
|
||||
var opts = this._keybindingService.lookupKeybindings(action.id);
|
||||
if (opts.length > 0) {
|
||||
return opts[0]; // only take the first one
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ import {renderHtml} from 'vs/base/browser/htmlContentRenderer';
|
|||
import {StandardKeyboardEvent} from 'vs/base/browser/keyboardEvent';
|
||||
import {StyleMutator} from 'vs/base/browser/styleMutator';
|
||||
import {IOSupport} from 'vs/platform/keybinding/common/keybindingResolver';
|
||||
import {IKeybindingService2} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IKeybindingService} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {ContextKeyExpr} from 'vs/platform/contextkey/common/contextkey';
|
||||
import {Range} from 'vs/editor/common/core/range';
|
||||
import * as editorCommon from 'vs/editor/common/editorCommon';
|
||||
|
@ -44,7 +44,7 @@ export class DefineKeybindingController implements editorCommon.IEditorContribut
|
|||
}
|
||||
|
||||
private _editor: ICodeEditor;
|
||||
private _keybindingService2:IKeybindingService2;
|
||||
private _keybindingService:IKeybindingService;
|
||||
private _launchWidget: DefineKeybindingLauncherWidget;
|
||||
private _defineWidget: DefineKeybindingWidget;
|
||||
private _toDispose: IDisposable[];
|
||||
|
@ -53,13 +53,13 @@ export class DefineKeybindingController implements editorCommon.IEditorContribut
|
|||
|
||||
constructor(
|
||||
editor:ICodeEditor,
|
||||
@IKeybindingService2 keybindingService2:IKeybindingService2
|
||||
@IKeybindingService keybindingService:IKeybindingService
|
||||
) {
|
||||
this._editor = editor;
|
||||
this._keybindingService2 = keybindingService2;
|
||||
this._keybindingService = keybindingService;
|
||||
this._toDispose = [];
|
||||
this._launchWidget = new DefineKeybindingLauncherWidget(this._editor, keybindingService2, () => this.launch());
|
||||
this._defineWidget = new DefineKeybindingWidget(this._editor, keybindingService2, (keybinding) => this._onAccepted(keybinding));
|
||||
this._launchWidget = new DefineKeybindingLauncherWidget(this._editor, keybindingService, () => this.launch());
|
||||
this._defineWidget = new DefineKeybindingWidget(this._editor, keybindingService, (keybinding) => this._onAccepted(keybinding));
|
||||
|
||||
this._toDispose.push(this._editor.onDidChangeConfiguration((e) => {
|
||||
if (isInterestingEditorModel(this._editor)) {
|
||||
|
@ -163,7 +163,7 @@ export class DefineKeybindingController implements editorCommon.IEditorContribut
|
|||
strKeybinding: strKeybinding,
|
||||
keybinding: keybinding,
|
||||
usLabel: keybinding._toUSLabel(),
|
||||
label: this._keybindingService2.getLabelFor(keybinding),
|
||||
label: this._keybindingService.getLabelFor(keybinding),
|
||||
range: range
|
||||
};
|
||||
});
|
||||
|
@ -188,7 +188,7 @@ export class DefineKeybindingController implements editorCommon.IEditorContribut
|
|||
} else {
|
||||
// this is the info case
|
||||
msg = [NLS_KB_LAYOUT_INFO_MESSAGE];
|
||||
msg = msg.concat(this._keybindingService2.getLabelFor(item.keybinding));
|
||||
msg = msg.concat(this._keybindingService.getLabelFor(item.keybinding));
|
||||
className = 'keybindingInfo';
|
||||
inlineClassName = 'inlineKeybindingInfo';
|
||||
overviewRulerColor = 'rgba(100, 100, 250, 0.6)';
|
||||
|
@ -233,16 +233,16 @@ class DefineKeybindingLauncherWidget implements IOverlayWidget {
|
|||
private _toDispose: IDisposable[];
|
||||
private _isVisible: boolean;
|
||||
|
||||
constructor(editor:ICodeEditor, keybindingService2:IKeybindingService2, onLaunch:()=>void) {
|
||||
constructor(editor:ICodeEditor, keybindingService:IKeybindingService, onLaunch:()=>void) {
|
||||
this._editor = editor;
|
||||
this._domNode = document.createElement('div');
|
||||
this._domNode.className = 'defineKeybindingLauncher';
|
||||
this._domNode.style.display = 'none';
|
||||
this._isVisible = false;
|
||||
let keybinding = keybindingService2.lookupKeybindings(DefineKeybindingAction.ID);
|
||||
let keybinding = keybindingService.lookupKeybindings(DefineKeybindingAction.ID);
|
||||
let extra = '';
|
||||
if (keybinding.length > 0) {
|
||||
extra += ' ('+keybindingService2.getLabelFor(keybinding[0])+')';
|
||||
extra += ' ('+keybindingService.getLabelFor(keybinding[0])+')';
|
||||
}
|
||||
this._domNode.appendChild(document.createTextNode(NLS_LAUNCH_MESSAGE + extra));
|
||||
|
||||
|
@ -302,7 +302,7 @@ class DefineKeybindingWidget implements IOverlayWidget {
|
|||
private static HEIGHT = 90;
|
||||
|
||||
private _editor: ICodeEditor;
|
||||
private _keybindingService2:IKeybindingService2;
|
||||
private _keybindingService:IKeybindingService;
|
||||
|
||||
private _domNode: HTMLElement;
|
||||
private _toDispose: IDisposable[];
|
||||
|
@ -315,9 +315,9 @@ class DefineKeybindingWidget implements IOverlayWidget {
|
|||
private _onAccepted: (keybinding:string) => void;
|
||||
private _isVisible: boolean;
|
||||
|
||||
constructor(editor:ICodeEditor, keybindingService2:IKeybindingService2, onAccepted:(keybinding:string) => void) {
|
||||
constructor(editor:ICodeEditor, keybindingService:IKeybindingService, onAccepted:(keybinding:string) => void) {
|
||||
this._editor = editor;
|
||||
this._keybindingService2 = keybindingService2;
|
||||
this._keybindingService = keybindingService;
|
||||
this._onAccepted = onAccepted;
|
||||
this._toDispose = [];
|
||||
this._lastKeybinding = null;
|
||||
|
@ -369,7 +369,7 @@ class DefineKeybindingWidget implements IOverlayWidget {
|
|||
this._inputNode.title = 'keyCode: ' + keyEvent.browserEvent.keyCode;
|
||||
|
||||
dom.clearNode(this._outputNode);
|
||||
let htmlkb = this._keybindingService2.getHTMLLabelFor(this._lastKeybinding);
|
||||
let htmlkb = this._keybindingService.getHTMLLabelFor(this._lastKeybinding);
|
||||
htmlkb.forEach((item) => this._outputNode.appendChild(renderHtml(item)));
|
||||
}));
|
||||
this._toDispose.push(this._editor.onDidChangeConfiguration((e) => {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
'use strict';
|
||||
|
||||
import {IContextViewService} from 'vs/platform/contextview/browser/contextView';
|
||||
import {IKeybindingService2} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IKeybindingService} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IContextKeyService} from 'vs/platform/contextkey/common/contextkey';
|
||||
import {ICodeEditor} from 'vs/editor/browser/editorBrowser';
|
||||
import {EditorBrowserRegistry} from 'vs/editor/browser/editorBrowserExtensions';
|
||||
|
@ -20,11 +20,11 @@ class FindController extends CommonFindController implements IFindController {
|
|||
editor:ICodeEditor,
|
||||
@IContextViewService contextViewService: IContextViewService,
|
||||
@IContextKeyService contextKeyService: IContextKeyService,
|
||||
@IKeybindingService2 keybindingService2: IKeybindingService2
|
||||
@IKeybindingService keybindingService: IKeybindingService
|
||||
) {
|
||||
super(editor, contextKeyService);
|
||||
|
||||
this._widget = this._register(new FindWidget(editor, this, this._state, contextViewService, keybindingService2));
|
||||
this._widget = this._register(new FindWidget(editor, this, this._state, contextViewService, keybindingService));
|
||||
}
|
||||
|
||||
protected _start(opts:IFindStartOptions): void {
|
||||
|
|
|
@ -16,7 +16,7 @@ import {IContextViewProvider} from 'vs/base/browser/ui/contextview/contextview';
|
|||
import {FindInput} from 'vs/base/browser/ui/findinput/findInput';
|
||||
import {IMessage as InputBoxMessage, InputBox} from 'vs/base/browser/ui/inputbox/inputBox';
|
||||
import {Widget} from 'vs/base/browser/ui/widget';
|
||||
import {IKeybindingService2} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IKeybindingService} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IConfigurationChangedEvent} from 'vs/editor/common/editorCommon';
|
||||
import {ICodeEditor, IOverlayWidget, IOverlayWidgetPosition, OverlayWidgetPositionPreference} from 'vs/editor/browser/editorBrowser';
|
||||
import {FIND_IDS, MATCHES_LIMIT} from 'vs/editor/contrib/find/common/findModel';
|
||||
|
@ -54,7 +54,7 @@ export class FindWidget extends Widget implements IOverlayWidget {
|
|||
private _state: FindReplaceState;
|
||||
private _controller: IFindController;
|
||||
private _contextViewProvider: IContextViewProvider;
|
||||
private _keybindingService2: IKeybindingService2;
|
||||
private _keybindingService: IKeybindingService;
|
||||
|
||||
private _domNode: HTMLElement;
|
||||
private _findInput: FindInput;
|
||||
|
@ -79,14 +79,14 @@ export class FindWidget extends Widget implements IOverlayWidget {
|
|||
controller: IFindController,
|
||||
state: FindReplaceState,
|
||||
contextViewProvider: IContextViewProvider,
|
||||
keybindingService2: IKeybindingService2
|
||||
keybindingService: IKeybindingService
|
||||
) {
|
||||
super();
|
||||
this._codeEditor = codeEditor;
|
||||
this._controller = controller;
|
||||
this._state = state;
|
||||
this._contextViewProvider = contextViewProvider;
|
||||
this._keybindingService2 = keybindingService2;
|
||||
this._keybindingService = keybindingService;
|
||||
|
||||
this._isVisible = false;
|
||||
this._isReplaceVisible = false;
|
||||
|
@ -372,11 +372,11 @@ export class FindWidget extends Widget implements IOverlayWidget {
|
|||
// ----- initialization
|
||||
|
||||
private _keybindingLabelFor(actionId:string): string {
|
||||
let keybindings = this._keybindingService2.lookupKeybindings(actionId);
|
||||
let keybindings = this._keybindingService.lookupKeybindings(actionId);
|
||||
if (keybindings.length === 0) {
|
||||
return '';
|
||||
}
|
||||
return ' (' + this._keybindingService2.getLabelFor(keybindings[0]) + ')';
|
||||
return ' (' + this._keybindingService.getLabelFor(keybindings[0]) + ')';
|
||||
}
|
||||
|
||||
private _buildFindPart(): HTMLElement {
|
||||
|
|
|
@ -10,7 +10,7 @@ import {matchesFuzzy} from 'vs/base/common/filters';
|
|||
import {TPromise} from 'vs/base/common/winjs.base';
|
||||
import {IContext, IHighlight, QuickOpenEntryGroup, QuickOpenModel} from 'vs/base/parts/quickopen/browser/quickOpenModel';
|
||||
import {IAutoFocus, Mode} from 'vs/base/parts/quickopen/common/quickOpen';
|
||||
import {IKeybindingService2} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IKeybindingService} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IEditorAction, ICommonCodeEditor, IEditor, EditorContextKeys} from 'vs/editor/common/editorCommon';
|
||||
import {BaseEditorQuickOpenAction} from './editorQuickOpen';
|
||||
import {editorAction, ServicesAccessor} from 'vs/editor/common/editorCommonExtensions';
|
||||
|
@ -86,11 +86,11 @@ export class QuickCommandAction extends BaseEditorQuickOpenAction {
|
|||
}
|
||||
|
||||
public run(accessor:ServicesAccessor, editor:ICommonCodeEditor): void {
|
||||
const keybindingService2 = accessor.get(IKeybindingService2);
|
||||
const keybindingService = accessor.get(IKeybindingService);
|
||||
|
||||
this._show(this.getController(editor), {
|
||||
getModel: (value:string):QuickOpenModel => {
|
||||
return new QuickOpenModel(this._editorActionsToEntries(keybindingService2, editor, value));
|
||||
return new QuickOpenModel(this._editorActionsToEntries(keybindingService, editor, value));
|
||||
},
|
||||
|
||||
getAutoFocus: (searchValue:string):IAutoFocus => {
|
||||
|
@ -109,14 +109,14 @@ export class QuickCommandAction extends BaseEditorQuickOpenAction {
|
|||
return elementAName.localeCompare(elementBName);
|
||||
}
|
||||
|
||||
private _editorActionsToEntries(keybindingService2:IKeybindingService2, editor:ICommonCodeEditor, searchValue: string): EditorActionCommandEntry[] {
|
||||
private _editorActionsToEntries(keybindingService:IKeybindingService, editor:ICommonCodeEditor, searchValue: string): EditorActionCommandEntry[] {
|
||||
let actions: IEditorAction[] = editor.getSupportedActions();
|
||||
let entries: EditorActionCommandEntry[] = [];
|
||||
|
||||
for (let i = 0; i < actions.length; i++) {
|
||||
let action = actions[i];
|
||||
|
||||
let keys = keybindingService2.lookupKeybindings(action.id).map(k => keybindingService2.getLabelFor(k));
|
||||
let keys = keybindingService.lookupKeybindings(action.id).map(k => keybindingService.getLabelFor(k));
|
||||
|
||||
if (action.label) {
|
||||
let highlights = matchesFuzzy(searchValue, action.label);
|
||||
|
|
|
@ -17,7 +17,7 @@ import { IDelegate, IFocusChangeEvent, IRenderer, ISelectionChangeEvent } from '
|
|||
import { List } from 'vs/base/browser/ui/list/listWidget';
|
||||
import { DomScrollableElement } from 'vs/base/browser/ui/scrollbar/scrollableElement';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IKeybindingService2 } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IConfigurationChangedEvent } from 'vs/editor/common/editorCommon';
|
||||
import { ContentWidgetPositionPreference, ICodeEditor, IContentWidget, IContentWidgetPosition } from 'vs/editor/browser/editorBrowser';
|
||||
|
@ -47,10 +47,10 @@ class Renderer implements IRenderer<CompletionItem, ISuggestionTemplateData> {
|
|||
constructor(
|
||||
private widget: SuggestWidget,
|
||||
private editor: ICodeEditor,
|
||||
@IKeybindingService2 keybindingService2: IKeybindingService2
|
||||
@IKeybindingService keybindingService: IKeybindingService
|
||||
) {
|
||||
const keybindings = keybindingService2.lookupKeybindings('editor.action.triggerSuggest');
|
||||
this.triggerKeybindingLabel = keybindings.length === 0 ? '' : ` (${keybindingService2.getLabelFor(keybindings[0])})`;
|
||||
const keybindings = keybindingService.lookupKeybindings('editor.action.triggerSuggest');
|
||||
this.triggerKeybindingLabel = keybindings.length === 0 ? '' : ` (${keybindingService.getLabelFor(keybindings[0])})`;
|
||||
}
|
||||
|
||||
get templateId(): string {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
'use strict';
|
||||
|
||||
import {localize} from 'vs/nls';
|
||||
import {IKeybindingService2} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IKeybindingService} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IMenu, MenuItemAction} from 'vs/platform/actions/common/actions';
|
||||
import {IMessageService} from 'vs/platform/message/common/message';
|
||||
import Severity from 'vs/base/common/severity';
|
||||
|
@ -63,9 +63,9 @@ export function fillInActions(menu: IMenu, target: IAction[] | { primary: IActio
|
|||
}
|
||||
|
||||
|
||||
export function createActionItem(action: IAction, keybindingService2: IKeybindingService2, messageService: IMessageService): ActionItem {
|
||||
export function createActionItem(action: IAction, keybindingService: IKeybindingService, messageService: IMessageService): ActionItem {
|
||||
if (action instanceof MenuItemAction) {
|
||||
return new MenuItemActionItem(action, keybindingService2, messageService);
|
||||
return new MenuItemActionItem(action, keybindingService, messageService);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -94,7 +94,7 @@ class MenuItemActionItem extends ActionItem {
|
|||
|
||||
constructor(
|
||||
action: MenuItemAction,
|
||||
@IKeybindingService2 private _keybindingService2: IKeybindingService2,
|
||||
@IKeybindingService private _keybindingService: IKeybindingService,
|
||||
@IMessageService private _messageService: IMessageService
|
||||
) {
|
||||
super(undefined, action, { icon: !!action.command.iconClass, label: !action.command.iconClass });
|
||||
|
@ -151,8 +151,8 @@ class MenuItemActionItem extends ActionItem {
|
|||
|
||||
_updateTooltip(): void {
|
||||
const element = this.$e.getHTMLElement();
|
||||
const keybinding = this._keybindingService2.lookupKeybindings(this._command.id)[0];
|
||||
const keybindingLabel = keybinding && this._keybindingService2.getLabelFor(keybinding);
|
||||
const keybinding = this._keybindingService.lookupKeybindings(this._command.id)[0];
|
||||
const keybindingLabel = keybinding && this._keybindingService.getLabelFor(keybinding);
|
||||
|
||||
element.title = keybindingLabel
|
||||
? localize('titleAndKb', "{0} ({1})", this._command.title, keybindingLabel)
|
||||
|
|
|
@ -15,13 +15,13 @@ import * as dom from 'vs/base/browser/dom';
|
|||
import {IKeyboardEvent, StandardKeyboardEvent} from 'vs/base/browser/keyboardEvent';
|
||||
import {ICommandService, CommandsRegistry, ICommandHandler, ICommandHandlerDescription} from 'vs/platform/commands/common/commands';
|
||||
import {KeybindingResolver} from 'vs/platform/keybinding/common/keybindingResolver';
|
||||
import {IKeybindingItem, IKeybindingService2} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IKeybindingItem, IKeybindingService} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IContextKeyService, KEYBINDING_CONTEXT_ATTR} from 'vs/platform/contextkey/common/contextkey';
|
||||
import {KeybindingsRegistry} from 'vs/platform/keybinding/common/keybindingsRegistry';
|
||||
import {IStatusbarService} from 'vs/platform/statusbar/common/statusbar';
|
||||
import {IMessageService} from 'vs/platform/message/common/message';
|
||||
|
||||
export abstract class KeybindingService2 implements IKeybindingService2 {
|
||||
export abstract class KeybindingService2 implements IKeybindingService {
|
||||
public _serviceBrand: any;
|
||||
|
||||
private _toDispose: IDisposable[] = [];
|
||||
|
|
|
@ -40,9 +40,9 @@ export interface IKeybindingItem {
|
|||
weight2: number;
|
||||
}
|
||||
|
||||
export let IKeybindingService2 = createDecorator<IKeybindingService2>('keybindingService2');
|
||||
export let IKeybindingService = createDecorator<IKeybindingService>('keybindingService');
|
||||
|
||||
export interface IKeybindingService2 {
|
||||
export interface IKeybindingService {
|
||||
_serviceBrand: any;
|
||||
|
||||
getLabelFor(keybinding: Keybinding): string;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
import {IHTMLContentElement} from 'vs/base/common/htmlContent';
|
||||
import {Keybinding} from 'vs/base/common/keyCodes';
|
||||
import Event from 'vs/base/common/event';
|
||||
import {IKeybindingService2} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IKeybindingService} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IContextKey, IContextKeyService, IContextValuesProvider, ContextKeyExpr} from 'vs/platform/contextkey/common/contextkey';
|
||||
|
||||
class MockKeybindingContextKey<T> implements IContextKey<T> {
|
||||
|
@ -59,7 +59,7 @@ export class MockKeybindingService implements IContextKeyService {
|
|||
}
|
||||
}
|
||||
|
||||
export class MockKeybindingService2 implements IKeybindingService2 {
|
||||
export class MockKeybindingService2 implements IKeybindingService {
|
||||
public _serviceBrand: any;
|
||||
|
||||
public getLabelFor(keybinding: Keybinding): string {
|
||||
|
|
|
@ -23,7 +23,7 @@ import {IEditorGroupService} from 'vs/workbench/services/group/common/groupServi
|
|||
import {IStorageService, StorageScope} from 'vs/platform/storage/common/storage';
|
||||
import {IFileService, IFileOperationResult, FileOperationResult} from 'vs/platform/files/common/files';
|
||||
import {IMessageService, Severity, CloseAction} from 'vs/platform/message/common/message';
|
||||
import {IKeybindingService2} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IKeybindingService} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {SyncActionDescriptor} from 'vs/platform/actions/common/actions';
|
||||
import {IInstantiationService} from 'vs/platform/instantiation/common/instantiation';
|
||||
import {KeyMod, KeyCode} from 'vs/base/common/keyCodes';
|
||||
|
@ -47,7 +47,7 @@ export class BaseTwoEditorsAction extends Action {
|
|||
@IConfigurationService protected configurationService: IConfigurationService,
|
||||
@IMessageService protected messageService: IMessageService,
|
||||
@IWorkspaceContextService protected contextService: IWorkspaceContextService,
|
||||
@IKeybindingService2 protected keybindingService2: IKeybindingService2,
|
||||
@IKeybindingService protected keybindingService: IKeybindingService,
|
||||
@IInstantiationService protected instantiationService: IInstantiationService
|
||||
) {
|
||||
super(id, label);
|
||||
|
@ -96,10 +96,10 @@ export class BaseOpenSettingsAction extends BaseTwoEditorsAction {
|
|||
@IConfigurationService configurationService: IConfigurationService,
|
||||
@IMessageService messageService: IMessageService,
|
||||
@IWorkspaceContextService contextService: IWorkspaceContextService,
|
||||
@IKeybindingService2 keybindingService2: IKeybindingService2,
|
||||
@IKeybindingService keybindingService: IKeybindingService,
|
||||
@IInstantiationService instantiationService: IInstantiationService
|
||||
) {
|
||||
super(id, label, editorService, editorGroupService, fileService, configurationService, messageService, contextService, keybindingService2, instantiationService);
|
||||
super(id, label, editorService, editorGroupService, fileService, configurationService, messageService, contextService, keybindingService, instantiationService);
|
||||
}
|
||||
|
||||
protected open(emptySettingsContents: string, settingsResource: URI): TPromise<void> {
|
||||
|
@ -132,11 +132,11 @@ export class OpenGlobalSettingsAction extends BaseOpenSettingsAction {
|
|||
@IConfigurationService configurationService: IConfigurationService,
|
||||
@IMessageService messageService: IMessageService,
|
||||
@IWorkspaceContextService contextService: IWorkspaceContextService,
|
||||
@IKeybindingService2 keybindingService2: IKeybindingService2,
|
||||
@IKeybindingService keybindingService: IKeybindingService,
|
||||
@IInstantiationService instantiationService: IInstantiationService,
|
||||
@IStorageService private storageService: IStorageService
|
||||
) {
|
||||
super(id, label, editorService, editorGroupService, fileService, configurationService, messageService, contextService, keybindingService2, instantiationService);
|
||||
super(id, label, editorService, editorGroupService, fileService, configurationService, messageService, contextService, keybindingService, instantiationService);
|
||||
}
|
||||
|
||||
public run(event?: any): TPromise<void> {
|
||||
|
@ -184,16 +184,16 @@ export class OpenGlobalKeybindingsAction extends BaseTwoEditorsAction {
|
|||
@IConfigurationService configurationService: IConfigurationService,
|
||||
@IMessageService messageService: IMessageService,
|
||||
@IWorkspaceContextService contextService: IWorkspaceContextService,
|
||||
@IKeybindingService2 keybindingService2: IKeybindingService2,
|
||||
@IKeybindingService keybindingService: IKeybindingService,
|
||||
@IInstantiationService instantiationService: IInstantiationService
|
||||
) {
|
||||
super(id, label, editorService, editorGroupService, fileService, configurationService, messageService, contextService, keybindingService2, instantiationService);
|
||||
super(id, label, editorService, editorGroupService, fileService, configurationService, messageService, contextService, keybindingService, instantiationService);
|
||||
}
|
||||
|
||||
public run(event?: any): TPromise<void> {
|
||||
let emptyContents = '// ' + nls.localize('emptyKeybindingsHeader', "Place your key bindings in this file to overwrite the defaults") + '\n[\n]';
|
||||
|
||||
return this.openTwoEditors(DefaultKeybindingsInput.getInstance(this.instantiationService, this.keybindingService2), URI.file(this.contextService.getConfiguration().env.appKeybindingsPath), emptyContents);
|
||||
return this.openTwoEditors(DefaultKeybindingsInput.getInstance(this.instantiationService, this.keybindingService), URI.file(this.contextService.getConfiguration().env.appKeybindingsPath), emptyContents);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -243,10 +243,10 @@ class DefaultSettingsInput extends StringEditorInput {
|
|||
class DefaultKeybindingsInput extends StringEditorInput {
|
||||
private static INSTANCE: DefaultKeybindingsInput;
|
||||
|
||||
public static getInstance(instantiationService: IInstantiationService, keybindingService2: IKeybindingService2): DefaultKeybindingsInput {
|
||||
public static getInstance(instantiationService: IInstantiationService, keybindingService: IKeybindingService): DefaultKeybindingsInput {
|
||||
if (!DefaultKeybindingsInput.INSTANCE) {
|
||||
let defaultsHeader = '// ' + nls.localize('defaultKeybindingsHeader', "Overwrite key bindings by placing them into your key bindings file.");
|
||||
let defaultContents = keybindingService2.getDefaultKeybindings();
|
||||
let defaultContents = keybindingService.getDefaultKeybindings();
|
||||
|
||||
DefaultKeybindingsInput.INSTANCE = instantiationService.createInstance(DefaultKeybindingsInput, nls.localize('defaultKeybindings', "Default Keyboard Shortcuts"), null, defaultsHeader + '\n' + defaultContents, 'application/json', false);
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ import {IContextMenuService} from 'vs/platform/contextview/browser/contextView';
|
|||
import {IInstantiationService} from 'vs/platform/instantiation/common/instantiation';
|
||||
import {IMessageService} from 'vs/platform/message/common/message';
|
||||
import {ITelemetryService} from 'vs/platform/telemetry/common/telemetry';
|
||||
import {IKeybindingService2} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IKeybindingService} from 'vs/platform/keybinding/common/keybinding';
|
||||
// import {Scope, IActionBarRegistry, Extensions as ActionBarExtensions, prepareActions} from 'vs/workbench/browser/actionBarRegistry';
|
||||
// import Severity from 'vs/base/common/severity';
|
||||
// import {IAction} from 'vs/base/common/actions';
|
||||
|
@ -45,7 +45,7 @@ export class ActivitybarPart extends Part implements IActivityService {
|
|||
@IMessageService private messageService: IMessageService,
|
||||
@ITelemetryService private telemetryService: ITelemetryService,
|
||||
@IContextMenuService private contextMenuService: IContextMenuService,
|
||||
@IKeybindingService2 private keybindingService2: IKeybindingService2,
|
||||
@IKeybindingService private keybindingService: IKeybindingService,
|
||||
@IInstantiationService private instantiationService: IInstantiationService
|
||||
) {
|
||||
super(id);
|
||||
|
@ -139,7 +139,7 @@ export class ActivitybarPart extends Part implements IActivityService {
|
|||
let action = this.instantiationService.createInstance(ViewletActivityAction, viewlet.id + '.activity-bar-action', viewlet);
|
||||
|
||||
let keybinding: string = null;
|
||||
let keys = this.keybindingService2.lookupKeybindings(viewlet.id).map(k => this.keybindingService2.getLabelFor(k));
|
||||
let keys = this.keybindingService.lookupKeybindings(viewlet.id).map(k => this.keybindingService.getLabelFor(k));
|
||||
if (keys && keys.length) {
|
||||
keybinding = keys[0];
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ import {ServiceCollection} from 'vs/platform/instantiation/common/serviceCollect
|
|||
import {IMessageService, Severity} from 'vs/platform/message/common/message';
|
||||
import {IProgressService} from 'vs/platform/progress/common/progress';
|
||||
import {ITelemetryService} from 'vs/platform/telemetry/common/telemetry';
|
||||
import {IKeybindingService2} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IKeybindingService} from 'vs/platform/keybinding/common/keybinding';
|
||||
|
||||
export abstract class CompositePart<T extends Composite> extends Part {
|
||||
private instantiatedCompositeListeners: IDisposable[];
|
||||
|
@ -57,7 +57,7 @@ export abstract class CompositePart<T extends Composite> extends Part {
|
|||
private telemetryService: ITelemetryService,
|
||||
private contextMenuService: IContextMenuService,
|
||||
protected partService: IPartService,
|
||||
private keybindingService2: IKeybindingService2,
|
||||
private keybindingService: IKeybindingService,
|
||||
protected instantiationService: IInstantiationService,
|
||||
private registry: CompositeRegistry<T>,
|
||||
private activeCompositeSettingsKey: string,
|
||||
|
@ -330,7 +330,7 @@ export abstract class CompositePart<T extends Composite> extends Part {
|
|||
}
|
||||
|
||||
let keybinding: string = null;
|
||||
let keys = this.keybindingService2.lookupKeybindings(compositeId).map(k => this.keybindingService2.getLabelFor(k));
|
||||
let keys = this.keybindingService.lookupKeybindings(compositeId).map(k => this.keybindingService.getLabelFor(k));
|
||||
if (keys && keys.length) {
|
||||
keybinding = keys[0];
|
||||
}
|
||||
|
@ -419,7 +419,7 @@ export abstract class CompositePart<T extends Composite> extends Part {
|
|||
actionItemProvider: (action: Action) => this.actionItemProvider(action),
|
||||
orientation: ActionsOrientation.HORIZONTAL,
|
||||
getKeyBinding: (action) => {
|
||||
const opts = this.keybindingService2.lookupKeybindings(action.id);
|
||||
const opts = this.keybindingService.lookupKeybindings(action.id);
|
||||
if (opts.length > 0) {
|
||||
return opts[0]; // only take the first one
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ import {IPartService} from 'vs/workbench/services/part/common/partService';
|
|||
import {Position, IEditor, Direction, IResourceInput, IEditorInput} from 'vs/platform/editor/common/editor';
|
||||
import {IInstantiationService} from 'vs/platform/instantiation/common/instantiation';
|
||||
import {IHistoryService} from 'vs/workbench/services/history/common/history';
|
||||
import {IKeybindingService2} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IKeybindingService} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IEditorGroupService, GroupArrangement} from 'vs/workbench/services/group/common/groupService';
|
||||
import {BaseTextEditor} from 'vs/workbench/browser/parts/editor/textEditor';
|
||||
import {ICommandService} from 'vs/platform/commands/common/commands';
|
||||
|
@ -1024,7 +1024,7 @@ export class BaseQuickOpenEditorInGroupAction extends Action {
|
|||
id: string,
|
||||
label: string,
|
||||
@IQuickOpenService private quickOpenService: IQuickOpenService,
|
||||
@IKeybindingService2 private keybindingService2: IKeybindingService2,
|
||||
@IKeybindingService private keybindingService: IKeybindingService,
|
||||
@IEditorGroupService private editorGroupService: IEditorGroupService,
|
||||
@IWorkbenchEditorService private editorService: IWorkbenchEditorService
|
||||
) {
|
||||
|
@ -1032,7 +1032,7 @@ export class BaseQuickOpenEditorInGroupAction extends Action {
|
|||
}
|
||||
|
||||
public run(): TPromise<any> {
|
||||
let keys = this.keybindingService2.lookupKeybindings(this.id);
|
||||
let keys = this.keybindingService.lookupKeybindings(this.id);
|
||||
|
||||
const stacks = this.editorGroupService.getStacksModel();
|
||||
if (stacks.activeGroup) {
|
||||
|
@ -1062,11 +1062,11 @@ export class OpenPreviousRecentlyUsedEditorInGroupAction extends BaseQuickOpenEd
|
|||
id: string,
|
||||
label: string,
|
||||
@IQuickOpenService quickOpenService: IQuickOpenService,
|
||||
@IKeybindingService2 keybindingService2: IKeybindingService2,
|
||||
@IKeybindingService keybindingService: IKeybindingService,
|
||||
@IEditorGroupService editorGroupService: IEditorGroupService,
|
||||
@IWorkbenchEditorService editorService: IWorkbenchEditorService
|
||||
) {
|
||||
super(id, label, quickOpenService, keybindingService2, editorGroupService, editorService);
|
||||
super(id, label, quickOpenService, keybindingService, editorGroupService, editorService);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1079,11 +1079,11 @@ export class OpenNextRecentlyUsedEditorInGroupAction extends BaseQuickOpenEditor
|
|||
id: string,
|
||||
label: string,
|
||||
@IQuickOpenService quickOpenService: IQuickOpenService,
|
||||
@IKeybindingService2 keybindingService2: IKeybindingService2,
|
||||
@IKeybindingService keybindingService: IKeybindingService,
|
||||
@IEditorGroupService editorGroupService: IEditorGroupService,
|
||||
@IWorkbenchEditorService editorService: IWorkbenchEditorService
|
||||
) {
|
||||
super(id, label, quickOpenService, keybindingService2, editorGroupService, editorService);
|
||||
super(id, label, quickOpenService, keybindingService, editorGroupService, editorService);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1115,13 +1115,13 @@ export class OpenPreviousEditorFromHistoryAction extends Action {
|
|||
id: string,
|
||||
label: string,
|
||||
@IQuickOpenService private quickOpenService: IQuickOpenService,
|
||||
@IKeybindingService2 private keybindingService2: IKeybindingService2
|
||||
@IKeybindingService private keybindingService: IKeybindingService
|
||||
) {
|
||||
super(id, label);
|
||||
}
|
||||
|
||||
public run(): TPromise<any> {
|
||||
let keys = this.keybindingService2.lookupKeybindings(this.id);
|
||||
let keys = this.keybindingService.lookupKeybindings(this.id);
|
||||
|
||||
this.quickOpenService.show(null, { quickNavigateConfiguration: { keybindings: keys } });
|
||||
|
||||
|
@ -1195,7 +1195,7 @@ export class BaseQuickOpenNavigateAction extends Action {
|
|||
label: string,
|
||||
navigateNext: boolean,
|
||||
@IQuickOpenService private quickOpenService: IQuickOpenService,
|
||||
@IKeybindingService2 private keybindingService2: IKeybindingService2
|
||||
@IKeybindingService private keybindingService: IKeybindingService
|
||||
) {
|
||||
super(id, label);
|
||||
|
||||
|
@ -1203,7 +1203,7 @@ export class BaseQuickOpenNavigateAction extends Action {
|
|||
}
|
||||
|
||||
public run(event?: any): TPromise<any> {
|
||||
let keys = this.keybindingService2.lookupKeybindings(this.id);
|
||||
let keys = this.keybindingService.lookupKeybindings(this.id);
|
||||
|
||||
this.quickOpenService.quickNavigate({
|
||||
keybindings: keys
|
||||
|
@ -1222,9 +1222,9 @@ export class QuickOpenNavigateNextAction extends BaseQuickOpenNavigateAction {
|
|||
id: string,
|
||||
label: string,
|
||||
@IQuickOpenService quickOpenService: IQuickOpenService,
|
||||
@IKeybindingService2 keybindingService2: IKeybindingService2
|
||||
@IKeybindingService keybindingService: IKeybindingService
|
||||
) {
|
||||
super(id, label, true, quickOpenService, keybindingService2);
|
||||
super(id, label, true, quickOpenService, keybindingService);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1237,9 +1237,9 @@ export class QuickOpenNavigatePreviousAction extends BaseQuickOpenNavigateAction
|
|||
id: string,
|
||||
label: string,
|
||||
@IQuickOpenService quickOpenService: IQuickOpenService,
|
||||
@IKeybindingService2 keybindingService2: IKeybindingService2
|
||||
@IKeybindingService keybindingService: IKeybindingService
|
||||
) {
|
||||
super(id, label, false, quickOpenService, keybindingService2);
|
||||
super(id, label, false, quickOpenService, keybindingService);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ import {IUntitledEditorService} from 'vs/workbench/services/untitled/common/unti
|
|||
import {IMessageService} from 'vs/platform/message/common/message';
|
||||
import {ITelemetryService} from 'vs/platform/telemetry/common/telemetry';
|
||||
import {IInstantiationService} from 'vs/platform/instantiation/common/instantiation';
|
||||
import {IKeybindingService2} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IKeybindingService} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IContextKeyService} from 'vs/platform/contextkey/common/contextkey';
|
||||
import {IMenuService} from 'vs/platform/actions/common/actions';
|
||||
import {TitleControl} from 'vs/workbench/browser/parts/editor/titleControl';
|
||||
|
@ -49,13 +49,13 @@ export class TabsTitleControl extends TitleControl {
|
|||
@IEditorGroupService editorGroupService: IEditorGroupService,
|
||||
@IUntitledEditorService private untitledEditorService: IUntitledEditorService,
|
||||
@IContextKeyService contextKeyService: IContextKeyService,
|
||||
@IKeybindingService2 keybindingService2: IKeybindingService2,
|
||||
@IKeybindingService keybindingService: IKeybindingService,
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@IMessageService messageService: IMessageService,
|
||||
@IMenuService menuService: IMenuService,
|
||||
@IQuickOpenService quickOpenService: IQuickOpenService
|
||||
) {
|
||||
super(contextMenuService, instantiationService, configurationService, editorService, editorGroupService, contextKeyService, keybindingService2, telemetryService, messageService, menuService, quickOpenService);
|
||||
super(contextMenuService, instantiationService, configurationService, editorService, editorGroupService, contextKeyService, keybindingService, telemetryService, messageService, menuService, quickOpenService);
|
||||
|
||||
this.tabDisposeables = [];
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ import {StandardMouseEvent} from 'vs/base/browser/mouseEvent';
|
|||
import {ITelemetryService} from 'vs/platform/telemetry/common/telemetry';
|
||||
import {IInstantiationService} from 'vs/platform/instantiation/common/instantiation';
|
||||
import {IQuickOpenService} from 'vs/workbench/services/quickopen/common/quickOpenService';
|
||||
import {IKeybindingService2} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IKeybindingService} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IContextKeyService} from 'vs/platform/contextkey/common/contextkey';
|
||||
import {CloseEditorsInGroupAction, SplitEditorAction, CloseEditorAction, KeepEditorAction, CloseOtherEditorsInGroupAction, CloseRightEditorsInGroupAction, ShowEditorsInGroupAction} from 'vs/workbench/browser/parts/editor/editorActions';
|
||||
import {IDisposable, dispose} from 'vs/base/common/lifecycle';
|
||||
|
@ -96,7 +96,7 @@ export abstract class TitleControl implements ITitleAreaControl {
|
|||
@IWorkbenchEditorService protected editorService: IWorkbenchEditorService,
|
||||
@IEditorGroupService protected editorGroupService: IEditorGroupService,
|
||||
@IContextKeyService protected contextKeyService: IContextKeyService,
|
||||
@IKeybindingService2 protected keybindingService2: IKeybindingService2,
|
||||
@IKeybindingService protected keybindingService: IKeybindingService,
|
||||
@ITelemetryService protected telemetryService: ITelemetryService,
|
||||
@IMessageService protected messageService: IMessageService,
|
||||
@IMenuService protected menuService: IMenuService,
|
||||
|
@ -236,7 +236,7 @@ export abstract class TitleControl implements ITitleAreaControl {
|
|||
orientation: ActionsOrientation.HORIZONTAL,
|
||||
ariaLabel: nls.localize('araLabelEditorActions', "Editor actions"),
|
||||
getKeyBinding: (action) => {
|
||||
const opts = this.keybindingService2.lookupKeybindings(action.id);
|
||||
const opts = this.keybindingService.lookupKeybindings(action.id);
|
||||
if (opts.length > 0) {
|
||||
return opts[0]; // only take the first one
|
||||
}
|
||||
|
@ -284,7 +284,7 @@ export abstract class TitleControl implements ITitleAreaControl {
|
|||
|
||||
// Check extensions
|
||||
if (!actionItem) {
|
||||
actionItem = createActionItem(action, this.keybindingService2, this.messageService);
|
||||
actionItem = createActionItem(action, this.keybindingService, this.messageService);
|
||||
}
|
||||
|
||||
return actionItem;
|
||||
|
@ -416,7 +416,7 @@ export abstract class TitleControl implements ITitleAreaControl {
|
|||
getActions: () => TPromise.as(this.getContextMenuActions(identifier)),
|
||||
getActionsContext: () => identifier,
|
||||
getKeyBinding: (action) => {
|
||||
const opts = this.keybindingService2.lookupKeybindings(action.id);
|
||||
const opts = this.keybindingService.lookupKeybindings(action.id);
|
||||
if (opts.length > 0) {
|
||||
return opts[0]; // only take the first one
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ import {IStorageService} from 'vs/platform/storage/common/storage';
|
|||
import {IContextMenuService} from 'vs/platform/contextview/browser/contextView';
|
||||
import {IMessageService} from 'vs/platform/message/common/message';
|
||||
import {ITelemetryService} from 'vs/platform/telemetry/common/telemetry';
|
||||
import {IKeybindingService2} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IKeybindingService} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IKeyboardEvent} from 'vs/base/browser/keyboardEvent';
|
||||
import {IInstantiationService} from 'vs/platform/instantiation/common/instantiation';
|
||||
|
||||
|
@ -46,7 +46,7 @@ export class PanelPart extends CompositePart<Panel> implements IPanelService {
|
|||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@IContextMenuService contextMenuService: IContextMenuService,
|
||||
@IPartService partService: IPartService,
|
||||
@IKeybindingService2 keybindingService2: IKeybindingService2,
|
||||
@IKeybindingService keybindingService: IKeybindingService,
|
||||
@IInstantiationService instantiationService: IInstantiationService
|
||||
) {
|
||||
super(
|
||||
|
@ -55,7 +55,7 @@ export class PanelPart extends CompositePart<Panel> implements IPanelService {
|
|||
telemetryService,
|
||||
contextMenuService,
|
||||
partService,
|
||||
keybindingService2,
|
||||
keybindingService,
|
||||
instantiationService,
|
||||
(<PanelRegistry>Registry.as(PanelExtensions.Panels)),
|
||||
PanelPart.activePanelSettingsKey,
|
||||
|
|
|
@ -21,7 +21,7 @@ import {IStorageService} from 'vs/platform/storage/common/storage';
|
|||
import {IContextMenuService} from 'vs/platform/contextview/browser/contextView';
|
||||
import {IMessageService} from 'vs/platform/message/common/message';
|
||||
import {ITelemetryService} from 'vs/platform/telemetry/common/telemetry';
|
||||
import {IKeybindingService2} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IKeybindingService} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {KeyMod, KeyCode} from 'vs/base/common/keyCodes';
|
||||
import {IInstantiationService} from 'vs/platform/instantiation/common/instantiation';
|
||||
import Event, {Emitter} from 'vs/base/common/event';
|
||||
|
@ -43,7 +43,7 @@ export class SidebarPart extends CompositePart<Viewlet> implements IViewletServi
|
|||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@IContextMenuService contextMenuService: IContextMenuService,
|
||||
@IPartService partService: IPartService,
|
||||
@IKeybindingService2 keybindingService2: IKeybindingService2,
|
||||
@IKeybindingService keybindingService: IKeybindingService,
|
||||
@IInstantiationService instantiationService: IInstantiationService
|
||||
) {
|
||||
super(
|
||||
|
@ -52,7 +52,7 @@ export class SidebarPart extends CompositePart<Viewlet> implements IViewletServi
|
|||
telemetryService,
|
||||
contextMenuService,
|
||||
partService,
|
||||
keybindingService2,
|
||||
keybindingService,
|
||||
instantiationService,
|
||||
(<ViewletRegistry>Registry.as(ViewletExtensions.Viewlets)),
|
||||
SidebarPart.activeViewletSettingsKey,
|
||||
|
|
|
@ -23,7 +23,7 @@ import {IViewlet} from 'vs/workbench/common/viewlet';
|
|||
import {Composite, CompositeDescriptor, CompositeRegistry} from 'vs/workbench/browser/composite';
|
||||
import {IContextMenuService} from 'vs/platform/contextview/browser/contextView';
|
||||
import {IMessageService} from 'vs/platform/message/common/message';
|
||||
import {IKeybindingService2} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IKeybindingService} from 'vs/platform/keybinding/common/keybinding';
|
||||
|
||||
export abstract class Viewlet extends Composite implements IViewlet {
|
||||
|
||||
|
@ -305,7 +305,7 @@ export abstract class AdaptiveCollapsibleViewletView extends FixedCollapsibleVie
|
|||
collapsed: boolean,
|
||||
private viewName: string,
|
||||
private messageService: IMessageService,
|
||||
private keybindingService2: IKeybindingService2,
|
||||
private keybindingService: IKeybindingService,
|
||||
protected contextMenuService: IContextMenuService
|
||||
) {
|
||||
super({
|
||||
|
@ -331,7 +331,7 @@ export abstract class AdaptiveCollapsibleViewletView extends FixedCollapsibleVie
|
|||
actionItemProvider: (action) => { return this.getActionItem(action); },
|
||||
ariaLabel: nls.localize('viewToolbarAriaLabel', "{0} actions", this.viewName),
|
||||
getKeyBinding: (action) => {
|
||||
const opts = this.keybindingService2.lookupKeybindings(action.id);
|
||||
const opts = this.keybindingService.lookupKeybindings(action.id);
|
||||
if (opts.length > 0) {
|
||||
return opts[0]; // only take the first one
|
||||
}
|
||||
|
@ -434,7 +434,7 @@ export abstract class CollapsibleViewletView extends CollapsibleView implements
|
|||
collapsed: boolean,
|
||||
private viewName: string,
|
||||
protected messageService: IMessageService,
|
||||
private keybindingService2: IKeybindingService2,
|
||||
private keybindingService: IKeybindingService,
|
||||
protected contextMenuService: IContextMenuService,
|
||||
headerSize?: number
|
||||
) {
|
||||
|
@ -467,7 +467,7 @@ export abstract class CollapsibleViewletView extends CollapsibleView implements
|
|||
actionItemProvider: (action) => { return this.getActionItem(action); },
|
||||
ariaLabel: nls.localize('viewToolbarAriaLabel', "{0} actions", this.viewName),
|
||||
getKeyBinding: (action) => {
|
||||
const opts = this.keybindingService2.lookupKeybindings(action.id);
|
||||
const opts = this.keybindingService.lookupKeybindings(action.id);
|
||||
if (opts.length > 0) {
|
||||
return opts[0]; // only take the first one
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ import {IInstantiationService} from 'vs/platform/instantiation/common/instantiat
|
|||
import {ITelemetryService} from 'vs/platform/telemetry/common/telemetry';
|
||||
import {IContextMenuService} from 'vs/platform/contextview/browser/contextView';
|
||||
import {ICommandService} from 'vs/platform/commands/common/commands';
|
||||
import {IKeybindingService2} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IKeybindingService} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IWorkspaceContextService}from 'vs/workbench/services/workspace/common/contextService';
|
||||
import {IWindowService} from 'vs/workbench/services/window/electron-browser/windowService';
|
||||
import {IWindowConfiguration} from 'vs/workbench/electron-browser/window';
|
||||
|
@ -51,7 +51,7 @@ export class ElectronIntegration {
|
|||
@ITelemetryService private telemetryService: ITelemetryService,
|
||||
@IConfigurationService private configurationService: IConfigurationService,
|
||||
@ICommandService private commandService: ICommandService,
|
||||
@IKeybindingService2 private keybindingService2: IKeybindingService2,
|
||||
@IKeybindingService private keybindingService: IKeybindingService,
|
||||
@IMessageService private messageService: IMessageService,
|
||||
@IContextMenuService private contextMenuService: IContextMenuService
|
||||
) {
|
||||
|
@ -156,7 +156,7 @@ export class ElectronIntegration {
|
|||
getAnchor: () => target,
|
||||
getActions: () => TPromise.as(TextInputActions),
|
||||
getKeyBinding: (action) => {
|
||||
const opts = this.keybindingService2.lookupKeybindings(action.id);
|
||||
const opts = this.keybindingService.lookupKeybindings(action.id);
|
||||
if (opts.length > 0) {
|
||||
return opts[0]; // only take the first one
|
||||
}
|
||||
|
@ -172,12 +172,12 @@ export class ElectronIntegration {
|
|||
private resolveKeybindings(actionIds: string[]): TPromise<{ id: string; binding: number; }[]> {
|
||||
return this.partService.joinCreation().then(() => {
|
||||
return arrays.coalesce(actionIds.map((id) => {
|
||||
let bindings = this.keybindingService2.lookupKeybindings(id);
|
||||
let bindings = this.keybindingService.lookupKeybindings(id);
|
||||
|
||||
// return the first binding that can be represented by electron
|
||||
for (let i = 0; i < bindings.length; i++) {
|
||||
let binding = bindings[i];
|
||||
let electronAccelerator = this.keybindingService2.getElectronAcceleratorFor(binding);
|
||||
let electronAccelerator = this.keybindingService.getElectronAcceleratorFor(binding);
|
||||
if (electronAccelerator) {
|
||||
return {
|
||||
id: id,
|
||||
|
|
|
@ -47,7 +47,7 @@ import {ContextMenuService} from 'vs/workbench/services/contextview/electron-bro
|
|||
import {WorkbenchKeybindingService2} from 'vs/workbench/services/keybinding/electron-browser/keybindingService';
|
||||
import {ContextKeyService} from 'vs/platform/contextkey/browser/contextKeyService';
|
||||
import {IWorkspace, IConfiguration} from 'vs/platform/workspace/common/workspace';
|
||||
import {IKeybindingService2} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IKeybindingService} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {ContextKeyExpr, RawContextKey, IContextKeyService, IContextKey} from 'vs/platform/contextkey/common/contextkey';
|
||||
import {IActivityService} from 'vs/workbench/services/activity/common/activityService';
|
||||
import {IViewletService} from 'vs/workbench/services/viewlet/common/viewletService';
|
||||
|
@ -106,7 +106,7 @@ export class Workbench implements IPartService {
|
|||
private workbenchShutdown: boolean;
|
||||
private editorService: WorkbenchEditorService;
|
||||
private contextKeyService: IContextKeyService;
|
||||
private keybindingService2: IKeybindingService2;
|
||||
private keybindingService: IKeybindingService;
|
||||
private activitybarPart: ActivitybarPart;
|
||||
private sidebarPart: SidebarPart;
|
||||
private panelPart: PanelPart;
|
||||
|
@ -275,7 +275,7 @@ export class Workbench implements IPartService {
|
|||
this.creationPromiseComplete(true);
|
||||
|
||||
if (this.callbacks && this.callbacks.onWorkbenchStarted) {
|
||||
this.callbacks.onWorkbenchStarted(this.keybindingService2.customKeybindingsCount());
|
||||
this.callbacks.onWorkbenchStarted(this.keybindingService.customKeybindingsCount());
|
||||
}
|
||||
|
||||
if (error) {
|
||||
|
@ -356,8 +356,8 @@ export class Workbench implements IPartService {
|
|||
this.contextKeyService = this.instantiationService.createInstance(ContextKeyService);
|
||||
serviceCollection.set(IContextKeyService, this.contextKeyService);
|
||||
|
||||
this.keybindingService2 = this.instantiationService.createInstance(WorkbenchKeybindingService2, <any>window);
|
||||
serviceCollection.set(IKeybindingService2, this.keybindingService2);
|
||||
this.keybindingService = this.instantiationService.createInstance(WorkbenchKeybindingService2, <any>window);
|
||||
serviceCollection.set(IKeybindingService, this.keybindingService);
|
||||
|
||||
// Context Menu
|
||||
serviceCollection.set(IContextMenuService, this.instantiationService.createInstance(ContextMenuService));
|
||||
|
|
|
@ -10,7 +10,7 @@ import {TPromise} from 'vs/base/common/winjs.base';
|
|||
import {Range} from 'vs/editor/common/core/range';
|
||||
import editorCommon = require('vs/editor/common/editorCommon');
|
||||
import editorbrowser = require('vs/editor/browser/editorBrowser');
|
||||
import {IKeybindingService2} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IKeybindingService} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {ContextKeyExpr} from 'vs/platform/contextkey/common/contextkey';
|
||||
import {ICommandService} from 'vs/platform/commands/common/commands';
|
||||
import debug = require('vs/workbench/parts/debug/common/debug');
|
||||
|
@ -33,14 +33,14 @@ export class AbstractDebugAction extends actions.Action {
|
|||
constructor(
|
||||
id: string, label: string, cssClass: string,
|
||||
@IDebugService protected debugService: IDebugService,
|
||||
@IKeybindingService2 protected keybindingService2: IKeybindingService2
|
||||
@IKeybindingService protected keybindingService: IKeybindingService
|
||||
) {
|
||||
super(id, label, cssClass, false);
|
||||
this.debugService = debugService;
|
||||
this.toDispose = [];
|
||||
this.toDispose.push(this.debugService.onDidChangeState((state) => this.updateEnablement(state)));
|
||||
|
||||
const keys = this.keybindingService2.lookupKeybindings(id).map(k => this.keybindingService2.getLabelFor(k));
|
||||
const keys = this.keybindingService.lookupKeybindings(id).map(k => this.keybindingService.getLabelFor(k));
|
||||
if (keys && keys.length) {
|
||||
this.keybinding = keys[0];
|
||||
}
|
||||
|
@ -81,8 +81,8 @@ export class ConfigureAction extends AbstractDebugAction {
|
|||
static ID = 'workbench.action.debug.configure';
|
||||
static LABEL = nls.localize('openLaunchJson', "Open {0}", 'launch.json');
|
||||
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService2 keybindingService2: IKeybindingService2) {
|
||||
super(id, label, 'debug-action configure', debugService, keybindingService2);
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) {
|
||||
super(id, label, 'debug-action configure', debugService, keybindingService);
|
||||
this.toDispose.push(debugService.getConfigurationManager().onDidConfigurationChange((configurationName) => {
|
||||
if (configurationName) {
|
||||
this.class = 'debug-action configure';
|
||||
|
@ -104,8 +104,8 @@ export class SelectConfigAction extends AbstractDebugAction {
|
|||
static ID = 'workbench.debug.action.setActiveConfig';
|
||||
static LABEL = nls.localize('selectConfig', "Select Configuration");
|
||||
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService2 keybindingService2: IKeybindingService2) {
|
||||
super(id, label, 'debug-action select-active-config', debugService, keybindingService2);
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) {
|
||||
super(id, label, 'debug-action select-active-config', debugService, keybindingService);
|
||||
}
|
||||
|
||||
public run(configName: string): TPromise<any> {
|
||||
|
@ -121,8 +121,8 @@ export class StartDebugAction extends AbstractDebugAction {
|
|||
static ID = 'workbench.action.debug.start';
|
||||
static LABEL = nls.localize('startDebug', "Start Debugging");
|
||||
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService2 keybindingService2: IKeybindingService2, @ICommandService private commandService: ICommandService) {
|
||||
super(id, label, 'debug-action start', debugService, keybindingService2);
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService, @ICommandService private commandService: ICommandService) {
|
||||
super(id, label, 'debug-action start', debugService, keybindingService);
|
||||
}
|
||||
|
||||
public run(): TPromise<any> {
|
||||
|
@ -139,8 +139,8 @@ export class RestartDebugAction extends AbstractDebugAction {
|
|||
static LABEL = nls.localize('restartDebug', "Restart");
|
||||
static RECONNECT_LABEL = nls.localize('reconnectDebug', "Reconnect");
|
||||
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService2 keybindingService2: IKeybindingService2) {
|
||||
super(id, label, 'debug-action restart', debugService, keybindingService2);
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) {
|
||||
super(id, label, 'debug-action restart', debugService, keybindingService);
|
||||
this.toDispose.push(this.debugService.onDidChangeState(() => {
|
||||
const session = this.debugService.getActiveSession();
|
||||
if (session) {
|
||||
|
@ -162,8 +162,8 @@ export class StepOverDebugAction extends AbstractDebugAction {
|
|||
static ID = 'workbench.action.debug.stepOver';
|
||||
static LABEL = nls.localize('stepOverDebug', "Step Over");
|
||||
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService2 keybindingService2: IKeybindingService2) {
|
||||
super(id, label, 'debug-action step-over', debugService, keybindingService2);
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) {
|
||||
super(id, label, 'debug-action step-over', debugService, keybindingService);
|
||||
}
|
||||
|
||||
public run(thread: debug.IThread): TPromise<any> {
|
||||
|
@ -182,8 +182,8 @@ export class StepIntoDebugAction extends AbstractDebugAction {
|
|||
static ID = 'workbench.action.debug.stepInto';
|
||||
static LABEL = nls.localize('stepIntoDebug', "Step Into");
|
||||
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService2 keybindingService2: IKeybindingService2) {
|
||||
super(id, label, 'debug-action step-into', debugService, keybindingService2);
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) {
|
||||
super(id, label, 'debug-action step-into', debugService, keybindingService);
|
||||
}
|
||||
|
||||
public run(thread: debug.IThread): TPromise<any> {
|
||||
|
@ -202,8 +202,8 @@ export class StepOutDebugAction extends AbstractDebugAction {
|
|||
static ID = 'workbench.action.debug.stepOut';
|
||||
static LABEL = nls.localize('stepOutDebug', "Step Out");
|
||||
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService2 keybindingService2: IKeybindingService2) {
|
||||
super(id, label, 'debug-action step-out', debugService, keybindingService2);
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) {
|
||||
super(id, label, 'debug-action step-out', debugService, keybindingService);
|
||||
}
|
||||
|
||||
public run(thread: debug.IThread): TPromise<any> {
|
||||
|
@ -222,8 +222,8 @@ export class StepBackDebugAction extends AbstractDebugAction {
|
|||
static ID = 'workbench.action.debug.stepBack';
|
||||
static LABEL = nls.localize('stepBackDebug', "Step Back");
|
||||
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService2 keybindingService2: IKeybindingService2) {
|
||||
super(id, label, 'debug-action step-back', debugService, keybindingService2);
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) {
|
||||
super(id, label, 'debug-action step-back', debugService, keybindingService);
|
||||
}
|
||||
|
||||
public run(thread: debug.IThread): TPromise<any> {
|
||||
|
@ -245,8 +245,8 @@ export class StopDebugAction extends AbstractDebugAction {
|
|||
static LABEL = nls.localize('stopDebug', "Stop");
|
||||
static DISCONNECT_LABEL = nls.localize('disconnectDebug', "Disconnect");
|
||||
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService2 keybindingService2: IKeybindingService2) {
|
||||
super(id, label, 'debug-action stop', debugService, keybindingService2);
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) {
|
||||
super(id, label, 'debug-action stop', debugService, keybindingService);
|
||||
this.toDispose.push(this.debugService.onDidChangeState(() => {
|
||||
const session = this.debugService.getActiveSession();
|
||||
if (session) {
|
||||
|
@ -269,8 +269,8 @@ export class ContinueAction extends AbstractDebugAction {
|
|||
static ID = 'workbench.action.debug.continue';
|
||||
static LABEL = nls.localize('continueDebug', "Continue");
|
||||
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService2 keybindingService2: IKeybindingService2) {
|
||||
super(id, label, 'debug-action continue', debugService, keybindingService2);
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) {
|
||||
super(id, label, 'debug-action continue', debugService, keybindingService);
|
||||
}
|
||||
|
||||
public run(thread: debug.IThread): TPromise<any> {
|
||||
|
@ -289,8 +289,8 @@ export class PauseAction extends AbstractDebugAction {
|
|||
static ID = 'workbench.action.debug.pause';
|
||||
static LABEL = nls.localize('pauseDebug', "Pause");
|
||||
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService2 keybindingService2: IKeybindingService2) {
|
||||
super(id, label, 'debug-action pause', debugService, keybindingService2);
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) {
|
||||
super(id, label, 'debug-action pause', debugService, keybindingService);
|
||||
}
|
||||
|
||||
public run(thread: debug.IThread): TPromise<any> {
|
||||
|
@ -309,8 +309,8 @@ export class RestartFrameAction extends AbstractDebugAction {
|
|||
static ID = 'workbench.action.debug.restartFrame';
|
||||
static LABEL = nls.localize('restartFrame', "Restart Frame");
|
||||
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService2 keybindingService2: IKeybindingService2) {
|
||||
super(id, label, 'debug-action restart-frame', debugService, keybindingService2);
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) {
|
||||
super(id, label, 'debug-action restart-frame', debugService, keybindingService);
|
||||
}
|
||||
|
||||
public run(frame: debug.IStackFrame): TPromise<any> {
|
||||
|
@ -327,8 +327,8 @@ export class RemoveBreakpointAction extends AbstractDebugAction {
|
|||
static ID = 'workbench.debug.viewlet.action.removeBreakpoint';
|
||||
static LABEL = nls.localize('removeBreakpoint', "Remove Breakpoint");
|
||||
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService2 keybindingService2: IKeybindingService2) {
|
||||
super(id, label, 'debug-action remove', debugService, keybindingService2);
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) {
|
||||
super(id, label, 'debug-action remove', debugService, keybindingService);
|
||||
}
|
||||
|
||||
public run(breakpoint: debug.IBreakpoint): TPromise<any> {
|
||||
|
@ -341,8 +341,8 @@ export class RemoveAllBreakpointsAction extends AbstractDebugAction {
|
|||
static ID = 'workbench.debug.viewlet.action.removeAllBreakpoints';
|
||||
static LABEL = nls.localize('removeAllBreakpoints', "Remove All Breakpoints");
|
||||
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService2 keybindingService2: IKeybindingService2) {
|
||||
super(id, label, 'debug-action remove-all', debugService, keybindingService2);
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) {
|
||||
super(id, label, 'debug-action remove-all', debugService, keybindingService);
|
||||
this.toDispose.push(this.debugService.getModel().onDidChangeBreakpoints(() => this.updateEnablement(this.debugService.state)));
|
||||
}
|
||||
|
||||
|
@ -360,8 +360,8 @@ export class ToggleEnablementAction extends AbstractDebugAction {
|
|||
static ID = 'workbench.debug.viewlet.action.toggleBreakpointEnablement';
|
||||
static LABEL = nls.localize('toggleEnablement', "Enable/Disable Breakpoint");
|
||||
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService2 keybindingService2: IKeybindingService2) {
|
||||
super(id, label, 'debug-action toggle-enablement', debugService, keybindingService2);
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) {
|
||||
super(id, label, 'debug-action toggle-enablement', debugService, keybindingService);
|
||||
}
|
||||
|
||||
public run(element: debug.IEnablement): TPromise<any> {
|
||||
|
@ -373,8 +373,8 @@ export class EnableAllBreakpointsAction extends AbstractDebugAction {
|
|||
static ID = 'workbench.debug.viewlet.action.enableAllBreakpoints';
|
||||
static LABEL = nls.localize('enableAllBreakpoints', "Enable All Breakpoints");
|
||||
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService2 keybindingService2: IKeybindingService2) {
|
||||
super(id, label, 'debug-action enable-all-breakpoints', debugService, keybindingService2);
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) {
|
||||
super(id, label, 'debug-action enable-all-breakpoints', debugService, keybindingService);
|
||||
this.toDispose.push(this.debugService.getModel().onDidChangeBreakpoints(() => this.updateEnablement(this.debugService.state)));
|
||||
}
|
||||
|
||||
|
@ -392,8 +392,8 @@ export class DisableAllBreakpointsAction extends AbstractDebugAction {
|
|||
static ID = 'workbench.debug.viewlet.action.disableAllBreakpoints';
|
||||
static LABEL = nls.localize('disableAllBreakpoints', "Disable All Breakpoints");
|
||||
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService2 keybindingService2: IKeybindingService2) {
|
||||
super(id, label, 'debug-action disable-all-breakpoints', debugService, keybindingService2);
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) {
|
||||
super(id, label, 'debug-action disable-all-breakpoints', debugService, keybindingService);
|
||||
this.toDispose.push(this.debugService.getModel().onDidChangeBreakpoints(() => this.updateEnablement(this.debugService.state)));
|
||||
}
|
||||
|
||||
|
@ -412,8 +412,8 @@ export class ToggleBreakpointsActivatedAction extends AbstractDebugAction {
|
|||
static ACTIVATE_LABEL = nls.localize('activateBreakpoints', "Activate Breakpoints");
|
||||
static DEACTIVATE_LABEL = nls.localize('deactivateBreakpoints', "Deactivate Breakpoints");
|
||||
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService2 keybindingService2: IKeybindingService2) {
|
||||
super(id, label, 'debug-action breakpoints-activate', debugService, keybindingService2);
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) {
|
||||
super(id, label, 'debug-action breakpoints-activate', debugService, keybindingService);
|
||||
this.updateLabel(this.debugService.getModel().areBreakpointsActivated() ? ToggleBreakpointsActivatedAction.DEACTIVATE_LABEL : ToggleBreakpointsActivatedAction.ACTIVATE_LABEL);
|
||||
|
||||
this.toDispose.push(this.debugService.getModel().onDidChangeBreakpoints(() => {
|
||||
|
@ -435,8 +435,8 @@ export class ReapplyBreakpointsAction extends AbstractDebugAction {
|
|||
static ID = 'workbench.debug.viewlet.action.reapplyBreakpointsAction';
|
||||
static LABEL = nls.localize('reapplyAllBreakpoints', "Reapply All Breakpoints");
|
||||
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService2 keybindingService2: IKeybindingService2) {
|
||||
super(id, label, null, debugService, keybindingService2);
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) {
|
||||
super(id, label, null, debugService, keybindingService);
|
||||
this.toDispose.push(this.debugService.getModel().onDidChangeBreakpoints(() => this.updateEnablement(this.debugService.state)));
|
||||
}
|
||||
|
||||
|
@ -455,8 +455,8 @@ export class AddFunctionBreakpointAction extends AbstractDebugAction {
|
|||
static ID = 'workbench.debug.viewlet.action.addFunctionBreakpointAction';
|
||||
static LABEL = nls.localize('addFunctionBreakpoint', "Add Function Breakpoint");
|
||||
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService2 keybindingService2: IKeybindingService2) {
|
||||
super(id, label, 'debug-action add-function-breakpoint', debugService, keybindingService2);
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) {
|
||||
super(id, label, 'debug-action add-function-breakpoint', debugService, keybindingService);
|
||||
}
|
||||
|
||||
public run(): TPromise<any> {
|
||||
|
@ -469,8 +469,8 @@ export class RenameFunctionBreakpointAction extends AbstractDebugAction {
|
|||
static ID = 'workbench.debug.viewlet.action.renameFunctionBreakpointAction';
|
||||
static LABEL = nls.localize('renameFunctionBreakpoint', "Rename Function Breakpoint");
|
||||
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService2 keybindingService2: IKeybindingService2) {
|
||||
super(id, label, null, debugService, keybindingService2);
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) {
|
||||
super(id, label, null, debugService, keybindingService);
|
||||
}
|
||||
|
||||
public run(fbp: debug.IFunctionBreakpoint): TPromise<any> {
|
||||
|
@ -487,10 +487,10 @@ export class AddConditionalBreakpointAction extends AbstractDebugAction {
|
|||
private editor: editorbrowser.ICodeEditor,
|
||||
private lineNumber: number,
|
||||
@IDebugService debugService: IDebugService,
|
||||
@IKeybindingService2 keybindingService2: IKeybindingService2,
|
||||
@IKeybindingService keybindingService: IKeybindingService,
|
||||
@IInstantiationService private instantiationService: IInstantiationService
|
||||
) {
|
||||
super(id, label, null, debugService, keybindingService2);
|
||||
super(id, label, null, debugService, keybindingService);
|
||||
}
|
||||
|
||||
public run(): TPromise<any> {
|
||||
|
@ -507,10 +507,10 @@ export class EditConditionalBreakpointAction extends AbstractDebugAction {
|
|||
private editor: editorbrowser.ICodeEditor,
|
||||
private lineNumber: number,
|
||||
@IDebugService debugService: IDebugService,
|
||||
@IKeybindingService2 keybindingService2: IKeybindingService2,
|
||||
@IKeybindingService keybindingService: IKeybindingService,
|
||||
@IInstantiationService private instantiationService: IInstantiationService
|
||||
) {
|
||||
super(id, label, null, debugService, keybindingService2);
|
||||
super(id, label, null, debugService, keybindingService);
|
||||
}
|
||||
|
||||
public run(breakpoint: debug.IBreakpoint): TPromise<any> {
|
||||
|
@ -574,8 +574,8 @@ export class SetValueAction extends AbstractDebugAction {
|
|||
static ID = 'workbench.debug.viewlet.action.setValue';
|
||||
static LABEL = nls.localize('setValue', "Set Value");
|
||||
|
||||
constructor(id: string, label: string, private variable: model.Variable, @IDebugService debugService: IDebugService, @IKeybindingService2 keybindingService2: IKeybindingService2) {
|
||||
super(id, label, null, debugService, keybindingService2);
|
||||
constructor(id: string, label: string, private variable: model.Variable, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) {
|
||||
super(id, label, null, debugService, keybindingService);
|
||||
}
|
||||
|
||||
public run(): TPromise<any> {
|
||||
|
@ -637,8 +637,8 @@ export class AddWatchExpressionAction extends AbstractDebugAction {
|
|||
static ID = 'workbench.debug.viewlet.action.addWatchExpression';
|
||||
static LABEL = nls.localize('addWatchExpression', "Add Expression");
|
||||
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService2 keybindingService2: IKeybindingService2) {
|
||||
super(id, label, 'debug-action add-watch-expression', debugService, keybindingService2);
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) {
|
||||
super(id, label, 'debug-action add-watch-expression', debugService, keybindingService);
|
||||
this.toDispose.push(this.debugService.getModel().onDidChangeWatchExpressions(() => this.updateEnablement(this.debugService.state)));
|
||||
}
|
||||
|
||||
|
@ -708,8 +708,8 @@ export class AddToWatchExpressionsAction extends AbstractDebugAction {
|
|||
static ID = 'workbench.debug.viewlet.action.addToWatchExpressions';
|
||||
static LABEL = nls.localize('addToWatchExpressions', "Add to Watch");
|
||||
|
||||
constructor(id: string, label: string, private expression: debug.IExpression, @IDebugService debugService: IDebugService, @IKeybindingService2 keybindingService2: IKeybindingService2) {
|
||||
super(id, label, 'debug-action add-to-watch', debugService, keybindingService2);
|
||||
constructor(id: string, label: string, private expression: debug.IExpression, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) {
|
||||
super(id, label, 'debug-action add-to-watch', debugService, keybindingService);
|
||||
}
|
||||
|
||||
public run(): TPromise<any> {
|
||||
|
@ -721,8 +721,8 @@ export class RenameWatchExpressionAction extends AbstractDebugAction {
|
|||
static ID = 'workbench.debug.viewlet.action.renameWatchExpression';
|
||||
static LABEL = nls.localize('renameWatchExpression', "Rename Expression");
|
||||
|
||||
constructor(id: string, label: string, private expression: model.Expression, @IDebugService debugService: IDebugService, @IKeybindingService2 keybindingService2: IKeybindingService2) {
|
||||
super(id, label, 'debug-action rename', debugService, keybindingService2);
|
||||
constructor(id: string, label: string, private expression: model.Expression, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) {
|
||||
super(id, label, 'debug-action rename', debugService, keybindingService);
|
||||
}
|
||||
|
||||
public run(): TPromise<any> {
|
||||
|
@ -735,8 +735,8 @@ export class RemoveWatchExpressionAction extends AbstractDebugAction {
|
|||
static ID = 'workbench.debug.viewlet.action.removeWatchExpression';
|
||||
static LABEL = nls.localize('removeWatchExpression', "Remove Expression");
|
||||
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService2 keybindingService2: IKeybindingService2) {
|
||||
super(id, label, 'debug-action remove', debugService, keybindingService2);
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) {
|
||||
super(id, label, 'debug-action remove', debugService, keybindingService);
|
||||
}
|
||||
|
||||
public run(expression: model.Expression): TPromise<any> {
|
||||
|
@ -749,8 +749,8 @@ export class RemoveAllWatchExpressionsAction extends AbstractDebugAction {
|
|||
static ID = 'workbench.debug.viewlet.action.removeAllWatchExpressions';
|
||||
static LABEL = nls.localize('removeAllWatchExpressions', "Remove All Expressions");
|
||||
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService2 keybindingService2: IKeybindingService2) {
|
||||
super(id, label, 'debug-action remove-all', debugService, keybindingService2);
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) {
|
||||
super(id, label, 'debug-action remove-all', debugService, keybindingService);
|
||||
this.toDispose.push(this.debugService.getModel().onDidChangeWatchExpressions(() => this.updateEnablement(this.debugService.state)));
|
||||
}
|
||||
|
||||
|
@ -770,10 +770,10 @@ export class ClearReplAction extends AbstractDebugAction {
|
|||
|
||||
constructor(id: string, label: string,
|
||||
@IDebugService debugService: IDebugService,
|
||||
@IKeybindingService2 keybindingService2: IKeybindingService2,
|
||||
@IKeybindingService keybindingService: IKeybindingService,
|
||||
@IPanelService private panelService: IPanelService
|
||||
) {
|
||||
super(id, label, 'debug-action clear-repl', debugService, keybindingService2);
|
||||
super(id, label, 'debug-action clear-repl', debugService, keybindingService);
|
||||
}
|
||||
|
||||
public run(): TPromise<any> {
|
||||
|
@ -792,9 +792,9 @@ export class ToggleReplAction extends AbstractDebugAction {
|
|||
@IDebugService debugService: IDebugService,
|
||||
@IPartService private partService: IPartService,
|
||||
@IPanelService private panelService: IPanelService,
|
||||
@IKeybindingService2 keybindingService2: IKeybindingService2
|
||||
@IKeybindingService keybindingService: IKeybindingService
|
||||
) {
|
||||
super(id, label, 'debug-action toggle-repl', debugService, keybindingService2);
|
||||
super(id, label, 'debug-action toggle-repl', debugService, keybindingService);
|
||||
this.enabled = this.debugService.state !== debug.State.Disabled;
|
||||
this.registerListeners();
|
||||
}
|
||||
|
@ -833,8 +833,8 @@ export class RunAction extends AbstractDebugAction {
|
|||
static ID = 'workbench.action.debug.run';
|
||||
static LABEL = nls.localize('startWithoutDebugging', "Start Without Debugging");
|
||||
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService2 keybindingService2: IKeybindingService2) {
|
||||
super(id, label, null, debugService, keybindingService2);
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) {
|
||||
super(id, label, null, debugService, keybindingService);
|
||||
}
|
||||
|
||||
public run(): TPromise<any> {
|
||||
|
|
|
@ -24,7 +24,7 @@ import {IContextMenuService} from 'vs/platform/contextview/browser/contextView';
|
|||
import {IInstantiationService} from 'vs/platform/instantiation/common/instantiation';
|
||||
import {ITelemetryService} from 'vs/platform/telemetry/common/telemetry';
|
||||
import {IMessageService} from 'vs/platform/message/common/message';
|
||||
import {IKeybindingService2} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IKeybindingService} from 'vs/platform/keybinding/common/keybinding';
|
||||
|
||||
import IDebugService = debug.IDebugService;
|
||||
|
||||
|
@ -56,10 +56,10 @@ export class VariablesView extends viewlet.CollapsibleViewletView {
|
|||
@IContextMenuService contextMenuService: IContextMenuService,
|
||||
@ITelemetryService private telemetryService: ITelemetryService,
|
||||
@IDebugService private debugService: IDebugService,
|
||||
@IKeybindingService2 keybindingService2: IKeybindingService2,
|
||||
@IKeybindingService keybindingService: IKeybindingService,
|
||||
@IInstantiationService private instantiationService: IInstantiationService
|
||||
) {
|
||||
super(actionRunner, !!settings[VariablesView.MEMENTO], nls.localize('variablesSection', "Variables Section"), messageService, keybindingService2, contextMenuService);
|
||||
super(actionRunner, !!settings[VariablesView.MEMENTO], nls.localize('variablesSection', "Variables Section"), messageService, keybindingService, contextMenuService);
|
||||
}
|
||||
|
||||
public renderHeader(container: HTMLElement): void {
|
||||
|
@ -145,10 +145,10 @@ export class WatchExpressionsView extends viewlet.CollapsibleViewletView {
|
|||
@IMessageService messageService: IMessageService,
|
||||
@IContextMenuService contextMenuService: IContextMenuService,
|
||||
@IDebugService private debugService: IDebugService,
|
||||
@IKeybindingService2 keybindingService2: IKeybindingService2,
|
||||
@IKeybindingService keybindingService: IKeybindingService,
|
||||
@IInstantiationService private instantiationService: IInstantiationService
|
||||
) {
|
||||
super(actionRunner, !!settings[WatchExpressionsView.MEMENTO], nls.localize('expressionsSection', "Expressions Section"), messageService, keybindingService2, contextMenuService);
|
||||
super(actionRunner, !!settings[WatchExpressionsView.MEMENTO], nls.localize('expressionsSection', "Expressions Section"), messageService, keybindingService, contextMenuService);
|
||||
this.toDispose.push(this.debugService.getModel().onDidChangeWatchExpressions(we => {
|
||||
// only expand when a new watch expression is added.
|
||||
if (we instanceof Expression) {
|
||||
|
@ -225,10 +225,10 @@ export class CallStackView extends viewlet.CollapsibleViewletView {
|
|||
@IContextMenuService contextMenuService: IContextMenuService,
|
||||
@ITelemetryService private telemetryService: ITelemetryService,
|
||||
@IDebugService private debugService: IDebugService,
|
||||
@IKeybindingService2 keybindingService2: IKeybindingService2,
|
||||
@IKeybindingService keybindingService: IKeybindingService,
|
||||
@IInstantiationService private instantiationService: IInstantiationService
|
||||
) {
|
||||
super(actionRunner, !!settings[CallStackView.MEMENTO], nls.localize('callstackSection', "Call Stack Section"), messageService, keybindingService2, contextMenuService);
|
||||
super(actionRunner, !!settings[CallStackView.MEMENTO], nls.localize('callstackSection', "Call Stack Section"), messageService, keybindingService, contextMenuService);
|
||||
}
|
||||
|
||||
public renderHeader(container: HTMLElement): void {
|
||||
|
@ -319,12 +319,12 @@ export class BreakpointsView extends viewlet.AdaptiveCollapsibleViewletView {
|
|||
@IMessageService messageService: IMessageService,
|
||||
@IContextMenuService contextMenuService: IContextMenuService,
|
||||
@IDebugService private debugService: IDebugService,
|
||||
@IKeybindingService2 keybindingService2: IKeybindingService2,
|
||||
@IKeybindingService keybindingService: IKeybindingService,
|
||||
@IInstantiationService private instantiationService: IInstantiationService
|
||||
) {
|
||||
super(actionRunner, BreakpointsView.getExpandedBodySize(
|
||||
debugService.getModel().getBreakpoints().length + debugService.getModel().getFunctionBreakpoints().length + debugService.getModel().getExceptionBreakpoints().length),
|
||||
!!settings[BreakpointsView.MEMENTO], nls.localize('breakpointsSection', "Breakpoints Section"), messageService, keybindingService2, contextMenuService);
|
||||
!!settings[BreakpointsView.MEMENTO], nls.localize('breakpointsSection', "Breakpoints Section"), messageService, keybindingService, contextMenuService);
|
||||
|
||||
this.toDispose.push(this.debugService.getModel().onDidChangeBreakpoints(() => this.onBreakpointsChange()));
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ import {SyncActionDescriptor} from 'vs/platform/actions/common/actions';
|
|||
import {IWorkbenchActionRegistry, Extensions as ActionExtensions} from 'vs/workbench/common/actionRegistry';
|
||||
import {IInstantiationService} from 'vs/platform/instantiation/common/instantiation';
|
||||
import {IWorkspaceContextService} from 'vs/platform/workspace/common/workspace';
|
||||
import {IKeybindingService2} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IKeybindingService} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {FileStat} from 'vs/workbench/parts/files/common/explorerViewModel';
|
||||
import {KeyMod, KeyCode} from 'vs/base/common/keyCodes';
|
||||
|
||||
|
@ -23,7 +23,7 @@ class FilesViewerActionContributor extends ActionBarContributor {
|
|||
constructor(
|
||||
@IInstantiationService private instantiationService: IInstantiationService,
|
||||
@IWorkspaceContextService private contextService: IWorkspaceContextService,
|
||||
@IKeybindingService2 private keybindingService2: IKeybindingService2
|
||||
@IKeybindingService private keybindingService: IKeybindingService
|
||||
) {
|
||||
super();
|
||||
}
|
||||
|
@ -123,7 +123,7 @@ class FilesViewerActionContributor extends ActionBarContributor {
|
|||
// Any other item with keybinding
|
||||
let keybinding = keybindingForAction(action.id);
|
||||
if (keybinding) {
|
||||
return new ActionItem(context, action, { label: true, keybinding: this.keybindingService2.getLabelFor(keybinding) });
|
||||
return new ActionItem(context, action, { label: true, keybinding: this.keybindingService.getLabelFor(keybinding) });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ import {IWorkspace} from 'vs/platform/workspace/common/workspace';
|
|||
import {IStorageService} from 'vs/platform/storage/common/storage';
|
||||
import {IConfigurationService} from 'vs/platform/configuration/common/configuration';
|
||||
import {IEventService} from 'vs/platform/event/common/event';
|
||||
import {IKeybindingService2} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IKeybindingService} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IInstantiationService} from 'vs/platform/instantiation/common/instantiation';
|
||||
import {IProgressService} from 'vs/platform/progress/common/progress';
|
||||
import {IWorkspaceContextService} from 'vs/platform/workspace/common/workspace';
|
||||
|
@ -83,10 +83,10 @@ export class ExplorerView extends CollapsibleViewletView {
|
|||
@IWorkbenchEditorService private editorService: IWorkbenchEditorService,
|
||||
@IFileService private fileService: IFileService,
|
||||
@IPartService private partService: IPartService,
|
||||
@IKeybindingService2 keybindingService2: IKeybindingService2,
|
||||
@IKeybindingService keybindingService: IKeybindingService,
|
||||
@IConfigurationService private configurationService: IConfigurationService
|
||||
) {
|
||||
super(actionRunner, false, nls.localize('explorerSection', "Files Explorer Section"), messageService, keybindingService2, contextMenuService, headerSize);
|
||||
super(actionRunner, false, nls.localize('explorerSection', "Files Explorer Section"), messageService, keybindingService, contextMenuService, headerSize);
|
||||
|
||||
this.workspace = contextService.getWorkspace();
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ import {IMessageService} from 'vs/platform/message/common/message';
|
|||
import {IInstantiationService} from 'vs/platform/instantiation/common/instantiation';
|
||||
import {IEditorGroupService} from 'vs/workbench/services/group/common/groupService';
|
||||
import {IConfigurationService} from 'vs/platform/configuration/common/configuration';
|
||||
import {IKeybindingService2} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IKeybindingService} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IEditorStacksModel, IStacksModelChangeEvent, IEditorGroup} from 'vs/workbench/common/editor';
|
||||
import {SaveAllAction} from 'vs/workbench/parts/files/browser/fileActions';
|
||||
import {AdaptiveCollapsibleViewletView} from 'vs/workbench/browser/viewlet';
|
||||
|
@ -52,11 +52,11 @@ export class OpenEditorsView extends AdaptiveCollapsibleViewletView {
|
|||
@ITextFileService private textFileService: ITextFileService,
|
||||
@IEditorGroupService private editorGroupService: IEditorGroupService,
|
||||
@IConfigurationService private configurationService: IConfigurationService,
|
||||
@IKeybindingService2 keybindingService2: IKeybindingService2,
|
||||
@IKeybindingService keybindingService: IKeybindingService,
|
||||
@IUntitledEditorService private untitledEditorService: IUntitledEditorService,
|
||||
@IViewletService private viewletService: IViewletService
|
||||
) {
|
||||
super(actionRunner, OpenEditorsView.computeExpandedBodySize(editorGroupService.getStacksModel()), !!settings[OpenEditorsView.MEMENTO_COLLAPSED], nls.localize('openEditosrSection', "Open Editors Section"), messageService, keybindingService2, contextMenuService);
|
||||
super(actionRunner, OpenEditorsView.computeExpandedBodySize(editorGroupService.getStacksModel()), !!settings[OpenEditorsView.MEMENTO_COLLAPSED], nls.localize('openEditosrSection', "Open Editors Section"), messageService, keybindingService, contextMenuService);
|
||||
|
||||
this.settings = settings;
|
||||
this.model = editorGroupService.getStacksModel();
|
||||
|
|
|
@ -20,7 +20,7 @@ import {IInstantiationService} from 'vs/platform/instantiation/common/instantiat
|
|||
import {ITelemetryService} from 'vs/platform/telemetry/common/telemetry';
|
||||
import {IEditorGroupService} from 'vs/workbench/services/group/common/groupService';
|
||||
import {IContextMenuService} from 'vs/platform/contextview/browser/contextView';
|
||||
import {IKeybindingService2} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IKeybindingService} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {UntitledEditorInput, IEditorGroup, IEditorStacksModel} from 'vs/workbench/common/editor';
|
||||
import {ContributableActionProvider} from 'vs/workbench/browser/actionBarRegistry';
|
||||
import {ITextFileService, AutoSaveMode, FileEditorInput, asFileResource} from 'vs/workbench/parts/files/common/files';
|
||||
|
@ -208,7 +208,7 @@ export class Controller extends treedefaults.DefaultController {
|
|||
@IInstantiationService private instantiationService: IInstantiationService,
|
||||
@IContextMenuService private contextMenuService: IContextMenuService,
|
||||
@ITelemetryService private telemetryService: ITelemetryService,
|
||||
@IKeybindingService2 private keybindingService2: IKeybindingService2
|
||||
@IKeybindingService private keybindingService: IKeybindingService
|
||||
) {
|
||||
super({ clickBehavior: treedefaults.ClickBehavior.ON_MOUSE_DOWN });
|
||||
}
|
||||
|
@ -315,7 +315,7 @@ export class Controller extends treedefaults.DefaultController {
|
|||
getAnchor: () => anchor,
|
||||
getActions: () => this.actionProvider.getSecondaryActions(tree, element),
|
||||
getKeyBinding: (action) => {
|
||||
const opts = this.keybindingService2.lookupKeybindings(action.id);
|
||||
const opts = this.keybindingService.lookupKeybindings(action.id);
|
||||
if (opts.length > 0) {
|
||||
return opts[0]; // only take the first one
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ import {IWorkbenchEditorService} from 'vs/workbench/services/editor/common/edito
|
|||
import {IInstantiationService} from 'vs/platform/instantiation/common/instantiation';
|
||||
import {IMessageService, Severity, IMessageWithAction} from 'vs/platform/message/common/message';
|
||||
import {ITelemetryService} from 'vs/platform/telemetry/common/telemetry';
|
||||
import {IKeybindingService2} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IKeybindingService} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IQuickOpenService} from 'vs/workbench/services/quickopen/common/quickOpenService';
|
||||
|
||||
export const ALL_COMMANDS_PREFIX = '>';
|
||||
|
@ -243,7 +243,7 @@ export class CommandsHandler extends QuickOpenHandler {
|
|||
@IWorkbenchEditorService private editorService: IWorkbenchEditorService,
|
||||
@IInstantiationService private instantiationService: IInstantiationService,
|
||||
@IMessageService private messageService: IMessageService,
|
||||
@IKeybindingService2 private keybindingService2: IKeybindingService2,
|
||||
@IKeybindingService private keybindingService: IKeybindingService,
|
||||
@IMenuService private menuService: IMenuService
|
||||
) {
|
||||
super();
|
||||
|
@ -302,9 +302,9 @@ export class CommandsHandler extends QuickOpenHandler {
|
|||
|
||||
for (let i = 0; i < actionDescriptors.length; i++) {
|
||||
let actionDescriptor = actionDescriptors[i];
|
||||
let keys = this.keybindingService2.lookupKeybindings(actionDescriptor.id);
|
||||
let keyLabel = keys.map(k => this.keybindingService2.getLabelFor(k));
|
||||
let keyAriaLabel = keys.map(k => this.keybindingService2.getAriaLabelFor(k));
|
||||
let keys = this.keybindingService.lookupKeybindings(actionDescriptor.id);
|
||||
let keyLabel = keys.map(k => this.keybindingService.getLabelFor(k));
|
||||
let keyAriaLabel = keys.map(k => this.keybindingService.getAriaLabelFor(k));
|
||||
|
||||
if (actionDescriptor.label) {
|
||||
|
||||
|
@ -334,9 +334,9 @@ export class CommandsHandler extends QuickOpenHandler {
|
|||
for (let i = 0; i < actions.length; i++) {
|
||||
let action = actions[i];
|
||||
|
||||
let keys = this.keybindingService2.lookupKeybindings(action.id);
|
||||
let keyLabel = keys.map(k => this.keybindingService2.getLabelFor(k));
|
||||
let keyAriaLabel = keys.map(k => this.keybindingService2.getAriaLabelFor(k));
|
||||
let keys = this.keybindingService.lookupKeybindings(action.id);
|
||||
let keyLabel = keys.map(k => this.keybindingService.getLabelFor(k));
|
||||
let keyAriaLabel = keys.map(k => this.keybindingService.getAriaLabelFor(k));
|
||||
let label = action.label;
|
||||
|
||||
if (label) {
|
||||
|
@ -358,9 +358,9 @@ export class CommandsHandler extends QuickOpenHandler {
|
|||
let entries: ActionCommandEntry[] = [];
|
||||
|
||||
for (let action of actions) {
|
||||
let keys = this.keybindingService2.lookupKeybindings(action.id);
|
||||
let keyLabel = keys.map(k => this.keybindingService2.getLabelFor(k));
|
||||
let keyAriaLabel = keys.map(k => this.keybindingService2.getAriaLabelFor(k));
|
||||
let keys = this.keybindingService.lookupKeybindings(action.id);
|
||||
let keyLabel = keys.map(k => this.keybindingService.getLabelFor(k));
|
||||
let keyAriaLabel = keys.map(k => this.keybindingService.getAriaLabelFor(k));
|
||||
let highlights = wordFilter(searchValue, action.label);
|
||||
if (highlights) {
|
||||
entries.push(this.instantiationService.createInstance(ActionCommandEntry, keyLabel.join(', '), keyAriaLabel.join(', '), action.label, null, highlights, null, action));
|
||||
|
|
|
@ -22,7 +22,7 @@ import { OpenGlobalSettingsAction } from 'vs/workbench/browser/actions/openSetti
|
|||
import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
import { Keybinding, KeyCode, KeyMod, CommonKeybindings } from 'vs/base/common/keyCodes';
|
||||
import { IKeybindingService2 } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { FileEditorInput } from 'vs/workbench/parts/files/common/editors/fileEditorInput';
|
||||
|
||||
export function isSearchViewletFocussed(viewletService: IViewletService):boolean {
|
||||
|
@ -31,9 +31,9 @@ export function isSearchViewletFocussed(viewletService: IViewletService):boolean
|
|||
return activeViewlet && activeViewlet.getId() === Constants.VIEWLET_ID && activeElement && DOM.isAncestor(activeElement, (<SearchViewlet>activeViewlet).getContainer().getHTMLElement());
|
||||
}
|
||||
|
||||
export function appendKeyBindingLabel(label: string, keyBinding: Keybinding, keyBindingService2: IKeybindingService2):string
|
||||
export function appendKeyBindingLabel(label: string, keyBinding: number, keyBindingService2: IKeybindingService2):string
|
||||
export function appendKeyBindingLabel(label: string, keyBinding: any, keyBindingService2: IKeybindingService2):string {
|
||||
export function appendKeyBindingLabel(label: string, keyBinding: Keybinding, keyBindingService2: IKeybindingService):string
|
||||
export function appendKeyBindingLabel(label: string, keyBinding: number, keyBindingService2: IKeybindingService):string
|
||||
export function appendKeyBindingLabel(label: string, keyBinding: any, keyBindingService2: IKeybindingService):string {
|
||||
keyBinding= typeof keyBinding === 'number' ? new Keybinding(keyBinding) : keyBinding;
|
||||
return label + ' (' + keyBindingService2.getLabelFor(keyBinding) + ')';
|
||||
}
|
||||
|
@ -191,7 +191,7 @@ export class ReplaceAllAction extends AbstractSearchAndReplaceAction {
|
|||
|
||||
constructor(private viewer: ITree, private fileMatch: FileMatch, private viewlet: SearchViewlet,
|
||||
@IReplaceService private replaceService: IReplaceService,
|
||||
@IKeybindingService2 keyBindingService2: IKeybindingService2,
|
||||
@IKeybindingService keyBindingService2: IKeybindingService,
|
||||
@ITelemetryService private telemetryService: ITelemetryService) {
|
||||
super('file-action-replace-all', appendKeyBindingLabel(nls.localize('file.replaceAll.label', "Replace All"), ReplaceAllAction.KEY_BINDING, keyBindingService2), 'action-replace-all');
|
||||
}
|
||||
|
@ -217,7 +217,7 @@ export class ReplaceAction extends AbstractSearchAndReplaceAction {
|
|||
|
||||
constructor(private viewer: ITree, private element: Match, private viewlet: SearchViewlet,
|
||||
@IReplaceService private replaceService: IReplaceService,
|
||||
@IKeybindingService2 keyBindingService2: IKeybindingService2,
|
||||
@IKeybindingService keyBindingService2: IKeybindingService,
|
||||
@IWorkbenchEditorService private editorService: IWorkbenchEditorService,
|
||||
@ITelemetryService private telemetryService: ITelemetryService) {
|
||||
super('action-replace', appendKeyBindingLabel(nls.localize('match.replace.label', "Replace"), ReplaceAction.KEY_BINDING, keyBindingService2), 'action-replace');
|
||||
|
|
|
@ -45,7 +45,7 @@ import {IMessageService} from 'vs/platform/message/common/message';
|
|||
import {ISearchService} from 'vs/platform/search/common/search';
|
||||
import {IProgressService} from 'vs/platform/progress/common/progress';
|
||||
import {IWorkspaceContextService} from 'vs/platform/workspace/common/workspace';
|
||||
import {IKeybindingService2} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IKeybindingService} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IContextKeyService, IContextKey} from 'vs/platform/contextkey/common/contextkey';
|
||||
import {ITelemetryService} from 'vs/platform/telemetry/common/telemetry';
|
||||
import {KeyCode, CommonKeybindings} from 'vs/base/common/keyCodes';
|
||||
|
@ -101,7 +101,7 @@ export class SearchViewlet extends Viewlet {
|
|||
@IWorkspaceContextService private contextService: IWorkspaceContextService,
|
||||
@ISearchService private searchService: ISearchService,
|
||||
@IContextKeyService private contextKeyService: IContextKeyService,
|
||||
@IKeybindingService2 private keybindingService2: IKeybindingService2,
|
||||
@IKeybindingService private keybindingService: IKeybindingService,
|
||||
@IReplaceService private replaceService: IReplaceService
|
||||
) {
|
||||
super(VIEWLET_ID, telemetryService);
|
||||
|
@ -269,7 +269,7 @@ export class SearchViewlet extends Viewlet {
|
|||
isRegex: isRegex,
|
||||
isCaseSensitive: isCaseSensitive,
|
||||
isWholeWords: isWholeWords
|
||||
}, this.contextKeyService, this.keybindingService2, this.instantiationService);
|
||||
}, this.contextKeyService, this.keybindingService, this.instantiationService);
|
||||
|
||||
if (this.storageService.getBoolean(SearchViewlet.SHOW_REPLACE_STORAGE_KEY, StorageScope.WORKSPACE, true)) {
|
||||
this.searchWidget.toggleReplace(true);
|
||||
|
|
|
@ -15,7 +15,7 @@ import { InputBox } from 'vs/base/browser/ui/inputbox/inputBox';
|
|||
import { Button } from 'vs/base/browser/ui/button/button';
|
||||
import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent';
|
||||
import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry';
|
||||
import { IKeybindingService2 } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { ContextKeyExpr, RawContextKey, IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { KeyCode, KeyMod } from 'vs/base/common/keyCodes';
|
||||
|
@ -67,7 +67,7 @@ export class SearchWidget extends Widget {
|
|||
|
||||
static REPLACE_ACTIVE_CONTEXT_KEY= new RawContextKey<boolean>('replaceActive', false);
|
||||
private static REPLACE_ALL_DISABLED_LABEL= nls.localize('search.action.replaceAll.disabled.label', "Replace All (Submit Search to Enable)");
|
||||
private static REPLACE_ALL_ENABLED_LABEL=(keyBindingService2: IKeybindingService2):string=>{
|
||||
private static REPLACE_ALL_ENABLED_LABEL=(keyBindingService2: IKeybindingService):string=>{
|
||||
let keybindings = keyBindingService2.lookupKeybindings(ReplaceAllAction.ID);
|
||||
return appendKeyBindingLabel(nls.localize('search.action.replaceAll.enabled.label', "Replace All"), keybindings[0], keyBindingService2);
|
||||
};
|
||||
|
@ -104,7 +104,7 @@ export class SearchWidget extends Widget {
|
|||
public onReplaceAll: Event<void> = this._onReplaceAll.event;
|
||||
|
||||
constructor(container: Builder, private contextViewService: IContextViewService, options: ISearchWidgetOptions= Object.create(null),
|
||||
private keyBindingService: IContextKeyService, private keyBindingService2: IKeybindingService2, private instantiationService: IInstantiationService) {
|
||||
private keyBindingService: IContextKeyService, private keyBindingService2: IKeybindingService, private instantiationService: IInstantiationService) {
|
||||
super();
|
||||
this.replaceActive = SearchWidget.REPLACE_ACTIVE_CONTEXT_KEY.bindTo(this.keyBindingService);
|
||||
this.render(container, options);
|
||||
|
|
|
@ -11,7 +11,7 @@ import xterm = require('xterm');
|
|||
import {Dimension} from 'vs/base/browser/builder';
|
||||
import {IContextMenuService} from 'vs/platform/contextview/browser/contextView';
|
||||
import {IInstantiationService} from 'vs/platform/instantiation/common/instantiation';
|
||||
import {IKeybindingService2} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IKeybindingService} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IContextKey} from 'vs/platform/contextkey/common/contextkey';
|
||||
import {IMessageService, Severity} from 'vs/platform/message/common/message';
|
||||
import {ITerminalFont} from 'vs/workbench/parts/terminal/electron-browser/terminalConfigHelper';
|
||||
|
@ -40,7 +40,7 @@ export class TerminalInstance {
|
|||
private contextMenuService: IContextMenuService,
|
||||
private contextService: IWorkspaceContextService,
|
||||
private instantiationService: IInstantiationService,
|
||||
private keybindingService2: IKeybindingService2,
|
||||
private keybindingService: IKeybindingService,
|
||||
private terminalService: ITerminalService,
|
||||
private messageService: IMessageService,
|
||||
private terminalFocusContextKey: IContextKey<boolean>,
|
||||
|
@ -170,7 +170,7 @@ export class TerminalInstance {
|
|||
|
||||
public setCommandsToSkipShell(commands: string[]): void {
|
||||
this.skipTerminalKeybindings = commands.map((c) => {
|
||||
return this.keybindingService2.lookupKeybindings(c);
|
||||
return this.keybindingService.lookupKeybindings(c);
|
||||
}).reduce((prev, curr) => {
|
||||
return prev.concat(curr);
|
||||
});
|
||||
|
|
|
@ -14,7 +14,7 @@ import {IActionItem} from 'vs/base/browser/ui/actionbar/actionbar';
|
|||
import {IConfigurationService} from 'vs/platform/configuration/common/configuration';
|
||||
import {IContextMenuService} from 'vs/platform/contextview/browser/contextView';
|
||||
import {IInstantiationService} from 'vs/platform/instantiation/common/instantiation';
|
||||
import {IKeybindingService2} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IKeybindingService} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IContextKey} from 'vs/platform/contextkey/common/contextkey';
|
||||
import {IMessageService} from 'vs/platform/message/common/message';
|
||||
import {ITelemetryService} from 'vs/platform/telemetry/common/telemetry';
|
||||
|
@ -49,7 +49,7 @@ export class TerminalPanel extends Panel {
|
|||
@IConfigurationService private configurationService: IConfigurationService,
|
||||
@IContextMenuService private contextMenuService: IContextMenuService,
|
||||
@IInstantiationService private instantiationService: IInstantiationService,
|
||||
@IKeybindingService2 private keybindingService2: IKeybindingService2,
|
||||
@IKeybindingService private keybindingService: IKeybindingService,
|
||||
@IWorkspaceContextService private contextService: IWorkspaceContextService,
|
||||
@ITerminalService private terminalService: ITerminalService,
|
||||
@IThemeService private themeService: IThemeService,
|
||||
|
@ -149,7 +149,7 @@ export class TerminalPanel extends Panel {
|
|||
getActions: () => TPromise.as(this.getContextMenuActions()),
|
||||
getActionsContext: () => this.parentDomElement,
|
||||
getKeyBinding: (action) => {
|
||||
const opts = this.keybindingService2.lookupKeybindings(action.id);
|
||||
const opts = this.keybindingService.lookupKeybindings(action.id);
|
||||
if (opts.length > 0) {
|
||||
return opts[0]; // only take the first one
|
||||
}
|
||||
|
@ -215,7 +215,7 @@ export class TerminalPanel extends Panel {
|
|||
this.contextMenuService,
|
||||
this.contextService,
|
||||
this.instantiationService,
|
||||
this.keybindingService2,
|
||||
this.keybindingService,
|
||||
this.terminalService,
|
||||
this.messageService,
|
||||
terminalFocusContextKey,
|
||||
|
|
|
@ -13,7 +13,7 @@ import dom = require('vs/base/browser/dom');
|
|||
import {IContextMenuService, IContextMenuDelegate, ContextSubMenu} from 'vs/platform/contextview/browser/contextView';
|
||||
import {ITelemetryService} from 'vs/platform/telemetry/common/telemetry';
|
||||
import {IMessageService} from 'vs/platform/message/common/message';
|
||||
import {IKeybindingService2} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IKeybindingService} from 'vs/platform/keybinding/common/keybinding';
|
||||
|
||||
import {remote, webFrame} from 'electron';
|
||||
|
||||
|
@ -24,7 +24,7 @@ export class ContextMenuService implements IContextMenuService {
|
|||
constructor(
|
||||
@IMessageService private messageService: IMessageService,
|
||||
@ITelemetryService private telemetryService: ITelemetryService,
|
||||
@IKeybindingService2 private keybindingService2: IKeybindingService2
|
||||
@IKeybindingService private keybindingService: IKeybindingService
|
||||
) {
|
||||
}
|
||||
|
||||
|
@ -77,7 +77,7 @@ export class ContextMenuService implements IContextMenuService {
|
|||
menu.append(submenu);
|
||||
} else {
|
||||
const keybinding = !!delegate.getKeyBinding ? delegate.getKeyBinding(e) : undefined;
|
||||
const accelerator = keybinding && this.keybindingService2.getElectronAcceleratorFor(keybinding);
|
||||
const accelerator = keybinding && this.keybindingService.getElectronAcceleratorFor(keybinding);
|
||||
|
||||
const item = new remote.MenuItem({
|
||||
label: e.label,
|
||||
|
|
Loading…
Reference in a new issue