Move EditorKbExpr to editorCommon
This commit is contained in:
parent
5a9667938d
commit
06ea27bf75
|
@ -20,6 +20,7 @@ import {Selection} from 'vs/editor/common/core/selection';
|
|||
import {ModeTransition} from 'vs/editor/common/core/modeTransition';
|
||||
import {IndentRange} from 'vs/editor/common/model/indentRanges';
|
||||
import {ICommandHandlerDescription} from 'vs/platform/commands/common/commands';
|
||||
import {KbExpr} from 'vs/platform/keybinding/common/keybinding';
|
||||
|
||||
/**
|
||||
* @internal
|
||||
|
@ -3050,6 +3051,47 @@ export const KEYBINDING_CONTEXT_EDITOR_LANGUAGE_ID = 'editorLangId';
|
|||
*/
|
||||
export const SHOW_ACCESSIBILITY_HELP_ACTION_ID = 'editor.action.showAccessibilityHelp';
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export interface IEditorKbExpr {
|
||||
TextFocus: KbExpr;
|
||||
Focus: KbExpr;
|
||||
|
||||
ReadOnly: KbExpr;
|
||||
Writable: KbExpr;
|
||||
|
||||
HasNonEmptySelection: KbExpr;
|
||||
HasOnlyEmptySelection: KbExpr;
|
||||
|
||||
HasMultipleSelections: KbExpr;
|
||||
HasSingleSelection: KbExpr;
|
||||
|
||||
TabMovesFocus: KbExpr;
|
||||
TabDoesNotMoveFocus: KbExpr;
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export let EditorKbExpr: IEditorKbExpr = {
|
||||
TextFocus: KbExpr.has(KEYBINDING_CONTEXT_EDITOR_TEXT_FOCUS),
|
||||
Focus: KbExpr.has(KEYBINDING_CONTEXT_EDITOR_FOCUS),
|
||||
|
||||
ReadOnly: KbExpr.has(KEYBINDING_CONTEXT_EDITOR_READONLY),
|
||||
Writable: KbExpr.not(KEYBINDING_CONTEXT_EDITOR_READONLY),
|
||||
|
||||
HasNonEmptySelection: KbExpr.has(KEYBINDING_CONTEXT_EDITOR_HAS_NON_EMPTY_SELECTION),
|
||||
HasOnlyEmptySelection: KbExpr.not(KEYBINDING_CONTEXT_EDITOR_HAS_NON_EMPTY_SELECTION),
|
||||
|
||||
HasMultipleSelections: KbExpr.has(KEYBINDING_CONTEXT_EDITOR_HAS_MULTIPLE_SELECTIONS),
|
||||
HasSingleSelection: KbExpr.not(KEYBINDING_CONTEXT_EDITOR_HAS_MULTIPLE_SELECTIONS),
|
||||
|
||||
TabMovesFocus: KbExpr.has(KEYBINDING_CONTEXT_EDITOR_TAB_MOVES_FOCUS),
|
||||
TabDoesNotMoveFocus: KbExpr.not(KEYBINDING_CONTEXT_EDITOR_TAB_MOVES_FOCUS),
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
|
|
|
@ -275,35 +275,3 @@ export abstract class HandlerEditorAction extends EditorAction {
|
|||
editor.trigger(this.id, this._handlerId, null);
|
||||
}
|
||||
}
|
||||
|
||||
export let EditorKbExpr: {
|
||||
TextFocus: KbExpr;
|
||||
Focus: KbExpr;
|
||||
|
||||
ReadOnly: KbExpr;
|
||||
Writable: KbExpr;
|
||||
|
||||
HasNonEmptySelection: KbExpr;
|
||||
HasOnlyEmptySelection: KbExpr;
|
||||
|
||||
HasMultipleSelections: KbExpr;
|
||||
HasSingleSelection: KbExpr;
|
||||
|
||||
TabMovesFocus: KbExpr;
|
||||
TabDoesNotMoveFocus: KbExpr;
|
||||
} = {
|
||||
TextFocus: KbExpr.has(editorCommon.KEYBINDING_CONTEXT_EDITOR_TEXT_FOCUS),
|
||||
Focus: KbExpr.has(editorCommon.KEYBINDING_CONTEXT_EDITOR_FOCUS),
|
||||
|
||||
ReadOnly: KbExpr.has(editorCommon.KEYBINDING_CONTEXT_EDITOR_READONLY),
|
||||
Writable: KbExpr.not(editorCommon.KEYBINDING_CONTEXT_EDITOR_READONLY),
|
||||
|
||||
HasNonEmptySelection: KbExpr.has(editorCommon.KEYBINDING_CONTEXT_EDITOR_HAS_NON_EMPTY_SELECTION),
|
||||
HasOnlyEmptySelection: KbExpr.not(editorCommon.KEYBINDING_CONTEXT_EDITOR_HAS_NON_EMPTY_SELECTION),
|
||||
|
||||
HasMultipleSelections: KbExpr.has(editorCommon.KEYBINDING_CONTEXT_EDITOR_HAS_MULTIPLE_SELECTIONS),
|
||||
HasSingleSelection: KbExpr.not(editorCommon.KEYBINDING_CONTEXT_EDITOR_HAS_MULTIPLE_SELECTIONS),
|
||||
|
||||
TabMovesFocus: KbExpr.has(editorCommon.KEYBINDING_CONTEXT_EDITOR_TAB_MOVES_FOCUS),
|
||||
TabDoesNotMoveFocus: KbExpr.not(editorCommon.KEYBINDING_CONTEXT_EDITOR_TAB_MOVES_FOCUS),
|
||||
};
|
||||
|
|
|
@ -18,8 +18,8 @@ import {ServicesAccessor} from 'vs/platform/instantiation/common/instantiation';
|
|||
import {IKeybindingContextKey, IKeybindingService} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {KeybindingsRegistry} from 'vs/platform/keybinding/common/keybindingsRegistry';
|
||||
import {GlobalScreenReaderNVDA} from 'vs/editor/common/config/commonEditorConfig';
|
||||
import {ICommonCodeEditor, IEditorContribution, SHOW_ACCESSIBILITY_HELP_ACTION_ID} from 'vs/editor/common/editorCommon';
|
||||
import {CommonEditorRegistry, EditorKbExpr, EditorAction} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {ICommonCodeEditor, IEditorContribution, EditorKbExpr, SHOW_ACCESSIBILITY_HELP_ACTION_ID} from 'vs/editor/common/editorCommon';
|
||||
import {CommonEditorRegistry, EditorAction} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {ICodeEditor, IOverlayWidget, IOverlayWidgetPosition} from 'vs/editor/browser/editorBrowser';
|
||||
import {EditorBrowserRegistry} from 'vs/editor/browser/editorBrowserExtensions';
|
||||
import {ToggleTabFocusModeAction} from 'vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode';
|
||||
|
|
|
@ -13,7 +13,7 @@ import {ServicesAccessor} from 'vs/platform/instantiation/common/instantiation';
|
|||
import {KbExpr} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {findFocusedEditor} from 'vs/editor/common/config/config';
|
||||
import * as editorCommon from 'vs/editor/common/editorCommon';
|
||||
import {EditorKbExpr, EditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {EditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {MenuId} from 'vs/platform/actions/common/actions';
|
||||
|
||||
const CLIPBOARD_CONTEXT_MENU_GROUP = '9_cutcopypaste';
|
||||
|
@ -63,13 +63,13 @@ class ExecCommandCutAction extends ClipboardWritingAction {
|
|||
|
||||
this.kbOpts = {
|
||||
commandHandler: execCommandToHandler.bind(null, this.id, 'cut'),
|
||||
kbExpr: KbExpr.and(EditorKbExpr.TextFocus, EditorKbExpr.Writable),
|
||||
kbExpr: KbExpr.and(editorCommon.EditorKbExpr.TextFocus, editorCommon.EditorKbExpr.Writable),
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_X,
|
||||
win: { primary: KeyMod.CtrlCmd | KeyCode.KEY_X, secondary: [KeyMod.Shift | KeyCode.Delete] }
|
||||
};
|
||||
|
||||
this.menuOpts = {
|
||||
kbExpr: EditorKbExpr.Writable,
|
||||
kbExpr: editorCommon.EditorKbExpr.Writable,
|
||||
menu: MenuId.EditorContext,
|
||||
group: CLIPBOARD_CONTEXT_MENU_GROUP,
|
||||
order: 1
|
||||
|
@ -101,7 +101,7 @@ class ExecCommandCopyAction extends ClipboardWritingAction {
|
|||
|
||||
this.kbOpts = {
|
||||
commandHandler: execCommandToHandler.bind(null, this.id, 'copy'),
|
||||
kbExpr: EditorKbExpr.TextFocus,
|
||||
kbExpr: editorCommon.EditorKbExpr.TextFocus,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_C,
|
||||
win: { primary: KeyMod.CtrlCmd | KeyCode.KEY_C, secondary: [KeyMod.CtrlCmd | KeyCode.Insert] }
|
||||
};
|
||||
|
@ -132,13 +132,13 @@ class ExecCommandPasteAction extends EditorAction {
|
|||
|
||||
this.kbOpts = {
|
||||
commandHandler: execCommandToHandler.bind(null, this.id, 'paste'),
|
||||
kbExpr: KbExpr.and(EditorKbExpr.TextFocus, EditorKbExpr.Writable),
|
||||
kbExpr: KbExpr.and(editorCommon.EditorKbExpr.TextFocus, editorCommon.EditorKbExpr.Writable),
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_V,
|
||||
win: { primary: KeyMod.CtrlCmd | KeyCode.KEY_V, secondary: [KeyMod.Shift | KeyCode.Insert] }
|
||||
};
|
||||
|
||||
this.menuOpts = {
|
||||
kbExpr: EditorKbExpr.Writable,
|
||||
kbExpr: editorCommon.EditorKbExpr.Writable,
|
||||
menu: MenuId.EditorContext,
|
||||
group: CLIPBOARD_CONTEXT_MENU_GROUP,
|
||||
order: 3
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
import * as nls from 'vs/nls';
|
||||
import {KeyCode, KeyMod} from 'vs/base/common/keyCodes';
|
||||
import {ICommand, ICommonCodeEditor} from 'vs/editor/common/editorCommon';
|
||||
import {EditorKbExpr, EditorAction, CommonEditorRegistry, ServicesAccessor} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {ICommand, ICommonCodeEditor, EditorKbExpr} from 'vs/editor/common/editorCommon';
|
||||
import {EditorAction, CommonEditorRegistry, ServicesAccessor} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {BlockCommentCommand} from './blockCommentCommand';
|
||||
import {LineCommentCommand, Type} from './lineCommentCommand';
|
||||
import {KbExpr} from 'vs/platform/keybinding/common/keybinding';
|
||||
|
|
|
@ -15,8 +15,8 @@ import {ActionItem, Separator} from 'vs/base/browser/ui/actionbar/actionbar';
|
|||
import {IContextMenuService, IContextViewService} from 'vs/platform/contextview/browser/contextView';
|
||||
import {IKeybindingService} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IMenuService, IMenu, MenuId} from 'vs/platform/actions/common/actions';
|
||||
import {ICommonCodeEditor, IEditorContribution, MouseTargetType} from 'vs/editor/common/editorCommon';
|
||||
import {ServicesAccessor, EditorKbExpr, EditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {ICommonCodeEditor, IEditorContribution, MouseTargetType, EditorKbExpr} from 'vs/editor/common/editorCommon';
|
||||
import {ServicesAccessor, EditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {ICodeEditor, IEditorMouseEvent} from 'vs/editor/browser/editorBrowser';
|
||||
import {EditorBrowserRegistry} from 'vs/editor/browser/editorBrowserExtensions';
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ import {IOSupport} from 'vs/platform/keybinding/common/keybindingResolver';
|
|||
import {IKeybindingService} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {Range} from 'vs/editor/common/core/range';
|
||||
import * as editorCommon from 'vs/editor/common/editorCommon';
|
||||
import {ServicesAccessor, EditorKbExpr, EditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {ServicesAccessor, EditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {ICodeEditor, IOverlayWidget, IOverlayWidgetPosition, OverlayWidgetPositionPreference} from 'vs/editor/browser/editorBrowser';
|
||||
import {EditorBrowserRegistry} from 'vs/editor/browser/editorBrowserExtensions';
|
||||
import {CodeSnippet, getSnippetController} from 'vs/editor/contrib/snippet/common/snippet';
|
||||
|
@ -456,7 +456,7 @@ export class DefineKeybindingAction extends EditorAction {
|
|||
);
|
||||
|
||||
this.kbOpts = {
|
||||
kbExpr: EditorKbExpr.Focus,
|
||||
kbExpr: editorCommon.EditorKbExpr.Focus,
|
||||
primary: KeyMod.chord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_K)
|
||||
};
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ import {Range} from 'vs/editor/common/core/range';
|
|||
import {Selection} from 'vs/editor/common/core/selection';
|
||||
import * as strings from 'vs/base/common/strings';
|
||||
import * as editorCommon from 'vs/editor/common/editorCommon';
|
||||
import {ServicesAccessor, EditorKbExpr, EditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {ServicesAccessor, EditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {FIND_IDS, FindModelBoundToEditorModel} from 'vs/editor/contrib/find/common/findModel';
|
||||
import {FindReplaceState, FindReplaceStateChangedEvent, INewFindReplaceState} from 'vs/editor/contrib/find/common/findState';
|
||||
import {DocumentHighlightProviderRegistry} from 'vs/editor/common/modes';
|
||||
|
@ -288,7 +288,7 @@ export class NextMatchFindAction extends MatchFindAction {
|
|||
);
|
||||
|
||||
this.kbOpts = {
|
||||
kbExpr: EditorKbExpr.Focus,
|
||||
kbExpr: editorCommon.EditorKbExpr.Focus,
|
||||
primary: KeyCode.F3,
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyCode.KEY_G, secondary: [KeyCode.F3] }
|
||||
};
|
||||
|
@ -309,7 +309,7 @@ export class PreviousMatchFindAction extends MatchFindAction {
|
|||
);
|
||||
|
||||
this.kbOpts = {
|
||||
kbExpr: EditorKbExpr.Focus,
|
||||
kbExpr: editorCommon.EditorKbExpr.Focus,
|
||||
primary: KeyMod.Shift | KeyCode.F3,
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_G, secondary: [KeyMod.Shift | KeyCode.F3] }
|
||||
};
|
||||
|
@ -356,7 +356,7 @@ export class NextSelectionMatchFindAction extends SelectionMatchFindAction {
|
|||
);
|
||||
|
||||
this.kbOpts = {
|
||||
kbExpr: EditorKbExpr.Focus,
|
||||
kbExpr: editorCommon.EditorKbExpr.Focus,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.F3
|
||||
};
|
||||
}
|
||||
|
@ -376,7 +376,7 @@ export class PreviousSelectionMatchFindAction extends SelectionMatchFindAction {
|
|||
);
|
||||
|
||||
this.kbOpts = {
|
||||
kbExpr: EditorKbExpr.Focus,
|
||||
kbExpr: editorCommon.EditorKbExpr.Focus,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.F3
|
||||
};
|
||||
}
|
||||
|
@ -538,7 +538,7 @@ export class AddSelectionToNextFindMatchAction extends SelectNextFindMatchAction
|
|||
);
|
||||
|
||||
this.kbOpts = {
|
||||
kbExpr: EditorKbExpr.Focus,
|
||||
kbExpr: editorCommon.EditorKbExpr.Focus,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_D
|
||||
};
|
||||
}
|
||||
|
@ -589,7 +589,7 @@ export class MoveSelectionToNextFindMatchAction extends SelectNextFindMatchActio
|
|||
);
|
||||
|
||||
this.kbOpts = {
|
||||
kbExpr: EditorKbExpr.Focus,
|
||||
kbExpr: editorCommon.EditorKbExpr.Focus,
|
||||
primary: KeyMod.chord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_D)
|
||||
};
|
||||
}
|
||||
|
@ -672,7 +672,7 @@ export class SelectHighlightsAction extends AbstractSelectHighlightsAction {
|
|||
);
|
||||
|
||||
this.kbOpts = {
|
||||
kbExpr: EditorKbExpr.Focus,
|
||||
kbExpr: editorCommon.EditorKbExpr.Focus,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_L
|
||||
};
|
||||
}
|
||||
|
@ -687,7 +687,7 @@ export class CompatChangeAll extends AbstractSelectHighlightsAction {
|
|||
);
|
||||
|
||||
this.kbOpts = {
|
||||
kbExpr: EditorKbExpr.TextFocus,
|
||||
kbExpr: editorCommon.EditorKbExpr.TextFocus,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.F2
|
||||
};
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ import {IDisposable, dispose} from 'vs/base/common/lifecycle';
|
|||
import {TPromise} from 'vs/base/common/winjs.base';
|
||||
import * as editorCommon from 'vs/editor/common/editorCommon';
|
||||
import {Range} from 'vs/editor/common/core/range';
|
||||
import {ServicesAccessor, EditorKbExpr, EditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {ServicesAccessor, EditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {ICodeEditor, IEditorMouseEvent} from 'vs/editor/browser/editorBrowser';
|
||||
import {EditorBrowserRegistry} from 'vs/editor/browser/editorBrowserExtensions';
|
||||
import {IFoldingRange} from 'vs/editor/contrib/folding/common/foldingRange';
|
||||
|
@ -652,7 +652,7 @@ abstract class FoldingAction2 extends EditorAction {
|
|||
super(id, label, alias, false);
|
||||
|
||||
this.kbOpts = {
|
||||
kbExpr: EditorKbExpr.Focus,
|
||||
kbExpr: editorCommon.EditorKbExpr.Focus,
|
||||
primary: keybinding
|
||||
};
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ import {IDisposable, dispose} from 'vs/base/common/lifecycle';
|
|||
import {TPromise} from 'vs/base/common/winjs.base';
|
||||
import * as editorCommon from 'vs/editor/common/editorCommon';
|
||||
import {KbExpr} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {ServicesAccessor, EditorKbExpr, EditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {ServicesAccessor, EditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {DocumentFormattingEditProviderRegistry, DocumentRangeFormattingEditProviderRegistry, OnTypeFormattingEditProviderRegistry} from 'vs/editor/common/modes';
|
||||
import {getOnTypeFormattingEdits, getDocumentFormattingEdits, getDocumentRangeFormattingEdits} from '../common/format';
|
||||
import {EditOperationsCommand} from './formatCommand';
|
||||
|
@ -143,7 +143,7 @@ export class FormatAction extends EditorAction {
|
|||
);
|
||||
|
||||
this.kbOpts = {
|
||||
kbExpr: KbExpr.and(EditorKbExpr.TextFocus, EditorKbExpr.Writable),
|
||||
kbExpr: KbExpr.and(editorCommon.EditorKbExpr.TextFocus, editorCommon.EditorKbExpr.Writable),
|
||||
primary: KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_F,
|
||||
linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_I }
|
||||
};
|
||||
|
|
|
@ -22,7 +22,7 @@ import {IEditorService} from 'vs/platform/editor/common/editor';
|
|||
import {IMessageService} from 'vs/platform/message/common/message';
|
||||
import {Range} from 'vs/editor/common/core/range';
|
||||
import * as editorCommon from 'vs/editor/common/editorCommon';
|
||||
import {ServicesAccessor, EditorKbExpr, EditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {ServicesAccessor, EditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {Location, DefinitionProviderRegistry} from 'vs/editor/common/modes';
|
||||
import {ICodeEditor, IEditorMouseEvent, IMouseTarget} from 'vs/editor/browser/editorBrowser';
|
||||
import {EditorBrowserRegistry} from 'vs/editor/browser/editorBrowserExtensions';
|
||||
|
@ -172,7 +172,7 @@ export class GoToDefinitionAction extends DefinitionAction {
|
|||
);
|
||||
|
||||
this.kbOpts = {
|
||||
kbExpr: EditorKbExpr.TextFocus,
|
||||
kbExpr: editorCommon.EditorKbExpr.TextFocus,
|
||||
primary: goToDeclarationKb
|
||||
};
|
||||
|
||||
|
@ -197,7 +197,7 @@ export class OpenDefinitionToSideAction extends DefinitionAction {
|
|||
);
|
||||
|
||||
this.kbOpts = {
|
||||
kbExpr: EditorKbExpr.TextFocus,
|
||||
kbExpr: editorCommon.EditorKbExpr.TextFocus,
|
||||
primary: KeyMod.chord(KeyMod.CtrlCmd | KeyCode.KEY_K, goToDeclarationKb)
|
||||
};
|
||||
}
|
||||
|
@ -214,7 +214,7 @@ export class PeekDefinitionAction extends DefinitionAction {
|
|||
);
|
||||
|
||||
this.kbOpts = {
|
||||
kbExpr: EditorKbExpr.TextFocus,
|
||||
kbExpr: editorCommon.EditorKbExpr.TextFocus,
|
||||
primary: KeyMod.Alt | KeyCode.F12,
|
||||
linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.F10 }
|
||||
};
|
||||
|
|
|
@ -23,7 +23,7 @@ import {ITelemetryService} from 'vs/platform/telemetry/common/telemetry';
|
|||
import {Position} from 'vs/editor/common/core/position';
|
||||
import {Range} from 'vs/editor/common/core/range';
|
||||
import * as editorCommon from 'vs/editor/common/editorCommon';
|
||||
import {ServicesAccessor, EditorKbExpr, EditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {ServicesAccessor, EditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {ICodeEditor} from 'vs/editor/browser/editorBrowser';
|
||||
import {EditorBrowserRegistry} from 'vs/editor/browser/editorBrowserExtensions';
|
||||
import {ZoneWidget} from 'vs/editor/contrib/zoneWidget/browser/zoneWidget';
|
||||
|
@ -520,7 +520,7 @@ class NextMarkerAction extends MarkerNavigationAction {
|
|||
);
|
||||
|
||||
this.kbOpts = {
|
||||
kbExpr: EditorKbExpr.Focus,
|
||||
kbExpr: editorCommon.EditorKbExpr.Focus,
|
||||
primary: KeyCode.F8
|
||||
};
|
||||
}
|
||||
|
@ -536,7 +536,7 @@ class PrevMarkerAction extends MarkerNavigationAction {
|
|||
);
|
||||
|
||||
this.kbOpts = {
|
||||
kbExpr: EditorKbExpr.Focus,
|
||||
kbExpr: editorCommon.EditorKbExpr.Focus,
|
||||
primary: KeyMod.Shift | KeyCode.F8
|
||||
};
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ import {IOpenerService} from 'vs/platform/opener/common/opener';
|
|||
import {IModeService} from 'vs/editor/common/services/modeService';
|
||||
import {Range} from 'vs/editor/common/core/range';
|
||||
import * as editorCommon from 'vs/editor/common/editorCommon';
|
||||
import {ServicesAccessor, EditorKbExpr, EditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {ServicesAccessor, EditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {ICodeEditor, IEditorMouseEvent} from 'vs/editor/browser/editorBrowser';
|
||||
import {EditorBrowserRegistry} from 'vs/editor/browser/editorBrowserExtensions';
|
||||
import {ModesContentHoverWidget} from './modesContentHover';
|
||||
|
@ -152,7 +152,7 @@ class ShowHoverAction extends EditorAction {
|
|||
);
|
||||
|
||||
this.kbOpts = {
|
||||
kbExpr: EditorKbExpr.TextFocus,
|
||||
kbExpr: editorCommon.EditorKbExpr.TextFocus,
|
||||
primary: KeyMod.chord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_I)
|
||||
};
|
||||
}
|
||||
|
|
|
@ -8,8 +8,8 @@ import * as nls from 'vs/nls';
|
|||
import {KeyCode, KeyMod} from 'vs/base/common/keyCodes';
|
||||
import {TPromise} from 'vs/base/common/winjs.base';
|
||||
import {Range} from 'vs/editor/common/core/range';
|
||||
import {IEditorContribution, CodeEditorStateFlag, ICommonCodeEditor, IModelDecorationsChangeAccessor} from 'vs/editor/common/editorCommon';
|
||||
import {ServicesAccessor, EditorKbExpr, EditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {EditorKbExpr, IEditorContribution, CodeEditorStateFlag, ICommonCodeEditor, IModelDecorationsChangeAccessor} from 'vs/editor/common/editorCommon';
|
||||
import {ServicesAccessor, EditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {IInplaceReplaceSupportResult} from 'vs/editor/common/modes';
|
||||
import {IEditorWorkerService} from 'vs/editor/common/services/editorWorkerService';
|
||||
import {InPlaceReplaceCommand} from './inPlaceReplaceCommand';
|
||||
|
|
|
@ -8,8 +8,8 @@ import * as nls from 'vs/nls';
|
|||
import {KeyCode, KeyMod} from 'vs/base/common/keyCodes';
|
||||
import {SortLinesCommand} from 'vs/editor/contrib/linesOperations/common/sortLinesCommand';
|
||||
import {TrimTrailingWhitespaceCommand} from 'vs/editor/common/commands/trimTrailingWhitespaceCommand';
|
||||
import {Handler, ICommand, ICommonCodeEditor} from 'vs/editor/common/editorCommon';
|
||||
import {ServicesAccessor, EditorKbExpr, EditorAction, HandlerEditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {EditorKbExpr, Handler, ICommand, ICommonCodeEditor} from 'vs/editor/common/editorCommon';
|
||||
import {ServicesAccessor, EditorAction, HandlerEditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {CopyLinesCommand} from './copyLinesCommand';
|
||||
import {DeleteLinesCommand} from './deleteLinesCommand';
|
||||
import {MoveLinesCommand} from './moveLinesCommand';
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
import * as nls from 'vs/nls';
|
||||
import {KeyCode, KeyMod} from 'vs/base/common/keyCodes';
|
||||
import {Handler, ICommonCodeEditor, ISelection} from 'vs/editor/common/editorCommon';
|
||||
import {ServicesAccessor, EditorKbExpr, EditorAction, HandlerEditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {Handler, ICommonCodeEditor, EditorKbExpr, ISelection} from 'vs/editor/common/editorCommon';
|
||||
import {ServicesAccessor, EditorAction, HandlerEditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions';
|
||||
|
||||
class InsertCursorAbove extends HandlerEditorAction {
|
||||
constructor() {
|
||||
|
|
|
@ -8,11 +8,11 @@ import * as nls from 'vs/nls';
|
|||
import { KeyCode, KeyMod } from 'vs/base/common/keyCodes';
|
||||
import { dispose } from 'vs/base/common/lifecycle';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { ICommonCodeEditor, IEditorContribution, KEYBINDING_CONTEXT_EDITOR_TEXT_FOCUS } from 'vs/editor/common/editorCommon';
|
||||
import { ICommonCodeEditor, IEditorContribution, KEYBINDING_CONTEXT_EDITOR_TEXT_FOCUS, EditorKbExpr } from 'vs/editor/common/editorCommon';
|
||||
import { KbExpr } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry';
|
||||
import { withCodeEditorFromCommandHandler } from 'vs/editor/common/config/config';
|
||||
import { ServicesAccessor, EditorKbExpr, EditorAction, CommonEditorRegistry } from 'vs/editor/common/editorCommonExtensions';
|
||||
import { ServicesAccessor, EditorAction, CommonEditorRegistry } from 'vs/editor/common/editorCommonExtensions';
|
||||
import { ICodeEditor } from 'vs/editor/browser/editorBrowser';
|
||||
import { EditorBrowserRegistry } from 'vs/editor/browser/editorBrowserExtensions';
|
||||
import { SignatureHelpProviderRegistry } from 'vs/editor/common/modes';
|
||||
|
|
|
@ -13,8 +13,8 @@ import {IKeybindingContextKey, IKeybindingService} from 'vs/platform/keybinding/
|
|||
import {IMarkerService} from 'vs/platform/markers/common/markers';
|
||||
import {IMessageService} from 'vs/platform/message/common/message';
|
||||
import {ITelemetryService} from 'vs/platform/telemetry/common/telemetry';
|
||||
import {ICommonCodeEditor, IEditorContribution, IRange} from 'vs/editor/common/editorCommon';
|
||||
import {ServicesAccessor, EditorKbExpr, EditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {ICommonCodeEditor, EditorKbExpr, IEditorContribution, IRange} from 'vs/editor/common/editorCommon';
|
||||
import {ServicesAccessor, EditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {ICodeEditor} from 'vs/editor/browser/editorBrowser';
|
||||
import {CodeActionProviderRegistry} from 'vs/editor/common/modes';
|
||||
import {EditorBrowserRegistry} from 'vs/editor/browser/editorBrowserExtensions';
|
||||
|
|
|
@ -12,7 +12,7 @@ import {IAutoFocus, Mode} from 'vs/base/parts/quickopen/common/quickOpen';
|
|||
import * as editorCommon from 'vs/editor/common/editorCommon';
|
||||
import {ICodeEditor, IDiffEditor} from 'vs/editor/browser/editorBrowser';
|
||||
import {BaseEditorQuickOpenAction, IDecorator} from './editorQuickOpen';
|
||||
import {EditorKbExpr, ServicesAccessor} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {ServicesAccessor} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {KeyCode, KeyMod} from 'vs/base/common/keyCodes';
|
||||
|
||||
interface ParseResult {
|
||||
|
@ -158,7 +158,7 @@ export class GotoLineAction extends BaseEditorQuickOpenAction {
|
|||
);
|
||||
|
||||
this.kbOpts = {
|
||||
kbExpr: EditorKbExpr.Focus,
|
||||
kbExpr: editorCommon.EditorKbExpr.Focus,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_G,
|
||||
mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_G }
|
||||
};
|
||||
|
|
|
@ -11,9 +11,9 @@ 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 {IKeybindingService} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IEditorAction, ICommonCodeEditor, IEditor} from 'vs/editor/common/editorCommon';
|
||||
import {IEditorAction, ICommonCodeEditor, IEditor, EditorKbExpr} from 'vs/editor/common/editorCommon';
|
||||
import {BaseEditorQuickOpenAction} from './editorQuickOpen';
|
||||
import {EditorKbExpr, ServicesAccessor} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {ServicesAccessor} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {KeyCode, KeyMod} from 'vs/base/common/keyCodes';
|
||||
import * as browser from 'vs/base/browser/browser';
|
||||
|
||||
|
|
|
@ -13,14 +13,13 @@ import * as strings from 'vs/base/common/strings';
|
|||
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 {ICommonCodeEditor, IRange} from 'vs/editor/common/editorCommon';
|
||||
import {ICommonCodeEditor, IRange, ModeContextKeys, EditorKbExpr} from 'vs/editor/common/editorCommon';
|
||||
import {SymbolInformation, SymbolKind, DocumentSymbolProviderRegistry} from 'vs/editor/common/modes';
|
||||
import {BaseEditorQuickOpenAction, IDecorator} from './editorQuickOpen';
|
||||
import {getDocumentSymbols, IOutline} from 'vs/editor/contrib/quickOpen/common/quickOpen';
|
||||
import {EditorKbExpr, ServicesAccessor} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {ServicesAccessor} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {KeyCode, KeyMod} from 'vs/base/common/keyCodes';
|
||||
import {KbExpr} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {ModeContextKeys} from 'vs/editor/common/editorCommon';
|
||||
|
||||
let SCOPE_PREFIX = ':';
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ import {KeybindingsRegistry} from 'vs/platform/keybinding/common/keybindingsRegi
|
|||
import {Position} from 'vs/editor/common/core/position';
|
||||
import {Range} from 'vs/editor/common/core/range';
|
||||
import * as editorCommon from 'vs/editor/common/editorCommon';
|
||||
import {ServicesAccessor, EditorKbExpr, EditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {ServicesAccessor, EditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {Location, ReferenceProviderRegistry} from 'vs/editor/common/modes';
|
||||
import {IPeekViewService, getOuterEditor} from 'vs/editor/contrib/zoneWidget/browser/peekViewWidget';
|
||||
import {provideReferences} from '../common/referenceSearch';
|
||||
|
@ -63,7 +63,7 @@ export class ReferenceAction extends EditorAction {
|
|||
);
|
||||
|
||||
this.kbOpts = {
|
||||
kbExpr: EditorKbExpr.TextFocus,
|
||||
kbExpr: editorCommon.EditorKbExpr.TextFocus,
|
||||
primary: KeyMod.Shift | KeyCode.F12
|
||||
};
|
||||
|
||||
|
|
|
@ -15,8 +15,8 @@ import {IEventService} from 'vs/platform/event/common/event';
|
|||
import {IKeybindingContextKey, IKeybindingService, KbExpr} from 'vs/platform/keybinding/common/keybinding';
|
||||
import {IMessageService} from 'vs/platform/message/common/message';
|
||||
import {IProgressService} from 'vs/platform/progress/common/progress';
|
||||
import {IRange, ICommonCodeEditor} from 'vs/editor/common/editorCommon';
|
||||
import {ServicesAccessor, EditorKbExpr, EditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {IRange, ICommonCodeEditor, EditorKbExpr} from 'vs/editor/common/editorCommon';
|
||||
import {ServicesAccessor, EditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {EditorBrowserRegistry} from 'vs/editor/browser/editorBrowserExtensions';
|
||||
import {KEYBINDING_CONTEXT_EDITOR_READONLY, ModeContextKeys, IEditorContribution} from 'vs/editor/common/editorCommon';
|
||||
import {BulkEdit, createBulkEdit} from 'vs/editor/common/services/bulkEdit';
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
import * as nls from 'vs/nls';
|
||||
import {KeyCode, KeyMod} from 'vs/base/common/keyCodes';
|
||||
import {Handler} from 'vs/editor/common/editorCommon';
|
||||
import {EditorKbExpr, HandlerEditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {Handler, EditorKbExpr} from 'vs/editor/common/editorCommon';
|
||||
import {HandlerEditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions';
|
||||
|
||||
class SelectBracketAction extends HandlerEditorAction {
|
||||
|
||||
|
|
|
@ -10,8 +10,8 @@ import {KeyCode, KeyMod} from 'vs/base/common/keyCodes';
|
|||
import {TPromise} from 'vs/base/common/winjs.base';
|
||||
import {IInstantiationService} from 'vs/platform/instantiation/common/instantiation';
|
||||
import {Range} from 'vs/editor/common/core/range';
|
||||
import {ICommonCodeEditor, ICursorPositionChangedEvent, IEditorContribution} from 'vs/editor/common/editorCommon';
|
||||
import {ServicesAccessor, EditorKbExpr, EditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {ICommonCodeEditor, ICursorPositionChangedEvent, EditorKbExpr, IEditorContribution} from 'vs/editor/common/editorCommon';
|
||||
import {ServicesAccessor, EditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {TokenSelectionSupport, ILogicalSelectionEntry} from './tokenSelectionSupport';
|
||||
|
||||
// --- selection state machine
|
||||
|
|
|
@ -9,8 +9,8 @@ import { KeyCode, KeyMod } from 'vs/base/common/keyCodes';
|
|||
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { KbExpr } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { ICommonCodeEditor, IEditorContribution, KEYBINDING_CONTEXT_EDITOR_TEXT_FOCUS } from 'vs/editor/common/editorCommon';
|
||||
import { ServicesAccessor, EditorKbExpr, EditorAction, CommonEditorRegistry } from 'vs/editor/common/editorCommonExtensions';
|
||||
import { ICommonCodeEditor, IEditorContribution, EditorKbExpr, KEYBINDING_CONTEXT_EDITOR_TEXT_FOCUS } from 'vs/editor/common/editorCommon';
|
||||
import { ServicesAccessor, EditorAction, CommonEditorRegistry } from 'vs/editor/common/editorCommonExtensions';
|
||||
import { ISuggestSupport, SuggestRegistry } from 'vs/editor/common/modes';
|
||||
import { ICodeEditor } from 'vs/editor/browser/editorBrowser';
|
||||
import { EditorBrowserRegistry } from 'vs/editor/browser/editorBrowserExtensions';
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
import * as nls from 'vs/nls';
|
||||
import {KeyCode, KeyMod} from 'vs/base/common/keyCodes';
|
||||
import {ICommonCodeEditor} from 'vs/editor/common/editorCommon';
|
||||
import {ServicesAccessor, EditorKbExpr, EditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {ICommonCodeEditor, EditorKbExpr} from 'vs/editor/common/editorCommon';
|
||||
import {ServicesAccessor, EditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions';
|
||||
|
||||
class ToggleWordWrapAction extends EditorAction {
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ import {BreakpointWidget} from 'vs/workbench/parts/debug/browser/breakpointWidge
|
|||
import {IPartService} from 'vs/workbench/services/part/common/partService';
|
||||
import {IPanelService} from 'vs/workbench/services/panel/common/panelService';
|
||||
import {IInstantiationService} from 'vs/platform/instantiation/common/instantiation';
|
||||
import {ServicesAccessor, EditorKbExpr, EditorAction} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {ServicesAccessor, EditorAction} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {KeyMod, KeyCode} from 'vs/base/common/keyCodes';
|
||||
import IDebugService = debug.IDebugService;
|
||||
|
||||
|
@ -526,7 +526,7 @@ export class ToggleBreakpointAction extends EditorAction {
|
|||
);
|
||||
|
||||
this.kbOpts = {
|
||||
kbExpr: EditorKbExpr.TextFocus,
|
||||
kbExpr: editorCommon.EditorKbExpr.TextFocus,
|
||||
primary: KeyCode.F9
|
||||
};
|
||||
}
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
import nls = require('vs/nls');
|
||||
import {BasicEmmetEditorAction} from 'vs/workbench/parts/emmet/node/emmetActions';
|
||||
|
||||
import {CommonEditorRegistry, EditorKbExpr} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {Handler, ICommonCodeEditor} from 'vs/editor/common/editorCommon';
|
||||
import {CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {Handler, ICommonCodeEditor, EditorKbExpr} from 'vs/editor/common/editorCommon';
|
||||
|
||||
import {KeyCode} from 'vs/base/common/keyCodes';
|
||||
import {KbExpr} from 'vs/platform/keybinding/common/keybinding';
|
||||
|
|
Loading…
Reference in a new issue