diff --git a/src/vs/editor/common/editorAction.ts b/src/vs/editor/common/editorAction.ts index 83f4e383d7280bdf82068b065bb194baf9107b82..eb5431d1dda6cd183d94dac9c6154eca78e8e374 100644 --- a/src/vs/editor/common/editorAction.ts +++ b/src/vs/editor/common/editorAction.ts @@ -7,7 +7,7 @@ import {TPromise} from 'vs/base/common/winjs.base'; import {IActionDescriptor, ICommonCodeEditor, IEditorAction} from 'vs/editor/common/editorCommon'; import {IInstantiationService} from 'vs/platform/instantiation/common/instantiation'; -import {EditorAction2} from 'vs/editor/common/editorCommonExtensions'; +import {EditorAction} from 'vs/editor/common/editorCommonExtensions'; export abstract class AbstractInternalEditorAction { @@ -25,10 +25,10 @@ export abstract class AbstractInternalEditorAction { export class InternalEditorAction extends AbstractInternalEditorAction implements IEditorAction { - private _actual: EditorAction2; + private _actual: EditorAction; private _instantiationService:IInstantiationService; - constructor(actual:EditorAction2, editor:ICommonCodeEditor, instantiationService:IInstantiationService) { + constructor(actual:EditorAction, editor:ICommonCodeEditor, instantiationService:IInstantiationService) { super(actual.id, actual.label, actual.alias, editor); this._actual = actual; this._instantiationService = instantiationService; diff --git a/src/vs/editor/common/editorCommonExtensions.ts b/src/vs/editor/common/editorCommonExtensions.ts index b91d7ba48be668a22ba9846270980a0b1312c79c..608769b58b12ff0a47584bc1be542ac1ae9b1868 100644 --- a/src/vs/editor/common/editorCommonExtensions.ts +++ b/src/vs/editor/common/editorCommonExtensions.ts @@ -6,7 +6,6 @@ import {illegalArgument, onUnexpectedError} from 'vs/base/common/errors'; import URI from 'vs/base/common/uri'; -import {SyncDescriptor1, createSyncDescriptor} from 'vs/platform/instantiation/common/descriptors'; import {TPromise} from 'vs/base/common/winjs.base'; import {ServicesAccessor, IInstantiationService} from 'vs/platform/instantiation/common/instantiation'; import {IKeybindings, KbExpr} from 'vs/platform/keybinding/common/keybinding'; @@ -38,20 +37,20 @@ export interface IEditorCommandHandler { export module CommonEditorRegistry { - export function registerEditorAction2(desc:EditorAction2) { - (Registry.as(Extensions.EditorCommonContributions)).registerEditorAction2(desc); + export function registerEditorAction(desc:EditorAction) { + (Registry.as(Extensions.EditorCommonContributions)).registerEditorAction(desc); } - export function getEditorActions(): EditorAction2[] { - return (Registry.as(Extensions.EditorCommonContributions)).getEditorActions2(); + export function getEditorActions(): EditorAction[] { + return (Registry.as(Extensions.EditorCommonContributions)).getEditorActions(); } // --- Editor Contributions export function registerEditorContribution(ctor:editorCommon.ICommonEditorContributionCtor): void { - (Registry.as(Extensions.EditorCommonContributions)).registerEditorContribution2(ctor); + (Registry.as(Extensions.EditorCommonContributions)).registerEditorContribution(ctor); } export function getEditorContributions(): editorCommon.ICommonEditorContributionDescriptor[] { - return (Registry.as(Extensions.EditorCommonContributions)).getEditorContributions2(); + return (Registry.as(Extensions.EditorCommonContributions)).getEditorContributions(); } // --- Editor Commands @@ -119,23 +118,6 @@ class SimpleEditorContributionDescriptor implements editorCommon.ICommonEditorCo } } -class InternalEditorActionDescriptor implements editorCommon.ICommonEditorContributionDescriptor { - - private _descriptor: SyncDescriptor1; - - constructor(ctor:editorCommon.IEditorActionContributionCtor, id:string, label:string, alias:string) { - this._descriptor = createSyncDescriptor(ctor, { - id, - label, - alias - }); - } - - public createInstance(instService:IInstantiationService, editor:editorCommon.ICommonCodeEditor): editorCommon.IEditorContribution { - return instService.createInstance(this._descriptor, editor); - } -} - // Editor extension points var Extensions = { EditorCommonContributions: 'editor.commonContributions' @@ -144,18 +126,18 @@ var Extensions = { class EditorContributionRegistry { private editorContributions: editorCommon.ICommonEditorContributionDescriptor[]; - private editorActions: EditorAction2[]; + private editorActions: EditorAction[]; constructor() { this.editorContributions = []; this.editorActions = []; } - public registerEditorContribution2(ctor:editorCommon.ICommonEditorContributionCtor): void { + public registerEditorContribution(ctor:editorCommon.ICommonEditorContributionCtor): void { this.editorContributions.push(new SimpleEditorContributionDescriptor(ctor)); } - public registerEditorAction2(action:EditorAction2) { + public registerEditorAction(action:EditorAction) { if (action.menuOpts) { MenuRegistry.appendMenuItem(action.menuOpts.menu || MenuId.EditorContext, { @@ -192,11 +174,11 @@ class EditorContributionRegistry { this.editorActions.push(action); } - public getEditorContributions2(): editorCommon.ICommonEditorContributionDescriptor[] { + public getEditorContributions(): editorCommon.ICommonEditorContributionDescriptor[] { return this.editorContributions.slice(0); } - public getEditorActions2(): EditorAction2[] { + public getEditorActions(): EditorAction[] { return this.editorActions.slice(0); } } @@ -245,7 +227,7 @@ export interface IEditorActionKeybindingOptions2 extends IKeybindings { commandHandler?: ICommandHandler; } -export abstract class EditorAction2 { +export abstract class EditorAction { private _needsWritableEditor: boolean; @@ -281,7 +263,7 @@ export abstract class EditorAction2 { public abstract run(accessor:ServicesAccessor, editor:editorCommon.ICommonCodeEditor): void | TPromise; } -export abstract class HandlerEditorAction2 extends EditorAction2 { +export abstract class HandlerEditorAction extends EditorAction { private _handlerId: string; constructor(id:string, label:string, alias:string, needsWritableEditor:boolean, handlerId: string) { diff --git a/src/vs/editor/contrib/accessibility/browser/accessibility.ts b/src/vs/editor/contrib/accessibility/browser/accessibility.ts index 923f924479159a41b62d2f1cd0d5f63be74c605d..082605b7aaf02ae80bbe9ce6344c87ad6534eb3b 100644 --- a/src/vs/editor/contrib/accessibility/browser/accessibility.ts +++ b/src/vs/editor/contrib/accessibility/browser/accessibility.ts @@ -19,7 +19,7 @@ import {IKeybindingContextKey, IKeybindingService} from 'vs/platform/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, EditorAction2} from 'vs/editor/common/editorCommonExtensions'; +import {CommonEditorRegistry, EditorKbExpr, 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'; @@ -189,7 +189,7 @@ class AccessibilityHelpWidget extends Widget implements IOverlayWidget { } } -class ShowAccessibilityHelpAction extends EditorAction2 { +class ShowAccessibilityHelpAction extends EditorAction { constructor() { super( @@ -212,7 +212,7 @@ class ShowAccessibilityHelpAction extends EditorAction2 { } EditorBrowserRegistry.registerEditorContribution(AccessibilityHelpController); -CommonEditorRegistry.registerEditorAction2(new ShowAccessibilityHelpAction()); +CommonEditorRegistry.registerEditorAction(new ShowAccessibilityHelpAction()); CommonEditorRegistry.registerEditorCommand('closeAccessibilityHelp', CommonEditorRegistry.commandWeight(100), { primary: KeyCode.Escape, secondary: [KeyMod.Shift | KeyCode.Escape] }, false, CONTEXT_ACCESSIBILITY_WIDGET_VISIBLE, (ctx, editor, args) => { AccessibilityHelpController.get(editor).hide(); }); diff --git a/src/vs/editor/contrib/carretOperations/common/carretOperations.ts b/src/vs/editor/contrib/carretOperations/common/carretOperations.ts index 1c9a7a06e1fa9d055caa434552f6ebf5b4688dcf..dfbe2ed887665f2bc6ad576be3581b5f55dc28e5 100644 --- a/src/vs/editor/contrib/carretOperations/common/carretOperations.ts +++ b/src/vs/editor/contrib/carretOperations/common/carretOperations.ts @@ -6,10 +6,10 @@ import * as nls from 'vs/nls'; import {ICommand, ICommonCodeEditor} from 'vs/editor/common/editorCommon'; -import {EditorAction2, CommonEditorRegistry, ServicesAccessor} from 'vs/editor/common/editorCommonExtensions'; +import {EditorAction, CommonEditorRegistry, ServicesAccessor} from 'vs/editor/common/editorCommonExtensions'; import {MoveCarretCommand} from './moveCarretCommand'; -class MoveCarretAction extends EditorAction2 { +class MoveCarretAction extends EditorAction { private left:boolean; @@ -55,5 +55,5 @@ class MoveCarretRightAction extends MoveCarretAction { } } -CommonEditorRegistry.registerEditorAction2(new MoveCarretLeftAction()); -CommonEditorRegistry.registerEditorAction2(new MoveCarretRightAction()); +CommonEditorRegistry.registerEditorAction(new MoveCarretLeftAction()); +CommonEditorRegistry.registerEditorAction(new MoveCarretRightAction()); diff --git a/src/vs/editor/contrib/clipboard/browser/clipboard.ts b/src/vs/editor/contrib/clipboard/browser/clipboard.ts index b245151feb9a80b91463d964d46b45866c0974b3..f1e05588a900526fb55923426353b422f79a51c2 100644 --- a/src/vs/editor/contrib/clipboard/browser/clipboard.ts +++ b/src/vs/editor/contrib/clipboard/browser/clipboard.ts @@ -13,12 +13,12 @@ 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, EditorAction2, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions'; +import {EditorKbExpr, EditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions'; import {MenuId} from 'vs/platform/actions/common/actions'; const CLIPBOARD_CONTEXT_MENU_GROUP = '9_cutcopypaste'; -abstract class ClipboardWritingAction extends EditorAction2 { +abstract class ClipboardWritingAction extends EditorAction { constructor(id:string, label:string, alias:string, needsWritableEditor:boolean) { super(id, label, alias, needsWritableEditor); @@ -120,7 +120,7 @@ class ExecCommandCopyAction extends ClipboardWritingAction { } } -class ExecCommandPasteAction extends EditorAction2 { +class ExecCommandPasteAction extends EditorAction { constructor() { super( @@ -159,13 +159,13 @@ class ExecCommandPasteAction extends EditorAction2 { } if (browser.supportsExecCommand('cut')) { - CommonEditorRegistry.registerEditorAction2(new ExecCommandCutAction()); + CommonEditorRegistry.registerEditorAction(new ExecCommandCutAction()); } if (browser.supportsExecCommand('copy')) { - CommonEditorRegistry.registerEditorAction2(new ExecCommandCopyAction()); + CommonEditorRegistry.registerEditorAction(new ExecCommandCopyAction()); } if (browser.supportsExecCommand('paste')) { - CommonEditorRegistry.registerEditorAction2(new ExecCommandPasteAction()); + CommonEditorRegistry.registerEditorAction(new ExecCommandPasteAction()); } function execCommandToHandler(actionId: string, browserCommand: string, accessor: ServicesAccessor, args: any): void { diff --git a/src/vs/editor/contrib/comment/common/comment.ts b/src/vs/editor/contrib/comment/common/comment.ts index 905564f56dcad2425592aaebc3be3acae0652a72..3fe3515157df0551a820f2b362aae0dea9d7ace3 100644 --- a/src/vs/editor/contrib/comment/common/comment.ts +++ b/src/vs/editor/contrib/comment/common/comment.ts @@ -7,12 +7,12 @@ import * as nls from 'vs/nls'; import {KeyCode, KeyMod} from 'vs/base/common/keyCodes'; import {ICommand, ICommonCodeEditor} from 'vs/editor/common/editorCommon'; -import {EditorKbExpr, EditorAction2, CommonEditorRegistry, ServicesAccessor} from 'vs/editor/common/editorCommonExtensions'; +import {EditorKbExpr, 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'; -abstract class CommentLineAction extends EditorAction2 { +abstract class CommentLineAction extends EditorAction { private _type: Type; @@ -91,7 +91,7 @@ class RemoveLineCommentAction extends CommentLineAction { } } -class BlockCommentAction extends EditorAction2 { +class BlockCommentAction extends EditorAction { constructor() { super( @@ -121,7 +121,7 @@ class BlockCommentAction extends EditorAction2 { } // register actions -CommonEditorRegistry.registerEditorAction2(new ToggleCommentLineAction()); -CommonEditorRegistry.registerEditorAction2(new AddLineCommentAction()); -CommonEditorRegistry.registerEditorAction2(new RemoveLineCommentAction()); -CommonEditorRegistry.registerEditorAction2(new BlockCommentAction()); +CommonEditorRegistry.registerEditorAction(new ToggleCommentLineAction()); +CommonEditorRegistry.registerEditorAction(new AddLineCommentAction()); +CommonEditorRegistry.registerEditorAction(new RemoveLineCommentAction()); +CommonEditorRegistry.registerEditorAction(new BlockCommentAction()); diff --git a/src/vs/editor/contrib/contextmenu/browser/contextmenu.ts b/src/vs/editor/contrib/contextmenu/browser/contextmenu.ts index bff700058f0b4d288b0f1451343e3a5c4211d898..953443a95106d2aab467b9e5ac9d462a7dffc6f1 100644 --- a/src/vs/editor/contrib/contextmenu/browser/contextmenu.ts +++ b/src/vs/editor/contrib/contextmenu/browser/contextmenu.ts @@ -16,7 +16,7 @@ import {IContextMenuService, IContextViewService} from 'vs/platform/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, EditorAction2, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions'; +import {ServicesAccessor, EditorKbExpr, EditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions'; import {ICodeEditor, IEditorMouseEvent} from 'vs/editor/browser/editorBrowser'; import {EditorBrowserRegistry} from 'vs/editor/browser/editorBrowserExtensions'; @@ -218,7 +218,7 @@ class ContextMenuController implements IEditorContribution { } } -class ShowContextMenu extends EditorAction2 { +class ShowContextMenu extends EditorAction { constructor() { super( @@ -241,4 +241,4 @@ class ShowContextMenu extends EditorAction2 { } EditorBrowserRegistry.registerEditorContribution(ContextMenuController); -CommonEditorRegistry.registerEditorAction2(new ShowContextMenu()); +CommonEditorRegistry.registerEditorAction(new ShowContextMenu()); diff --git a/src/vs/editor/contrib/defineKeybinding/browser/defineKeybinding.ts b/src/vs/editor/contrib/defineKeybinding/browser/defineKeybinding.ts index 10d67b39c5370b8a0ee3b8228bb6ad85c2546298..318104140ea088e79e62e18ff0f86e60b6b5f38d 100644 --- a/src/vs/editor/contrib/defineKeybinding/browser/defineKeybinding.ts +++ b/src/vs/editor/contrib/defineKeybinding/browser/defineKeybinding.ts @@ -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, EditorAction2, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions'; +import {ServicesAccessor, EditorKbExpr, 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'; @@ -443,7 +443,7 @@ class DefineKeybindingWidget implements IOverlayWidget { } } -export class DefineKeybindingAction extends EditorAction2 { +export class DefineKeybindingAction extends EditorAction { static ID = 'editor.action.defineKeybinding'; @@ -488,4 +488,4 @@ function isInterestingEditorModel(editor:editorCommon.ICommonCodeEditor): boolea } EditorBrowserRegistry.registerEditorContribution(DefineKeybindingController); -CommonEditorRegistry.registerEditorAction2(new DefineKeybindingAction()); +CommonEditorRegistry.registerEditorAction(new DefineKeybindingAction()); diff --git a/src/vs/editor/contrib/find/common/findController.ts b/src/vs/editor/contrib/find/common/findController.ts index 13dacb1d400889383e4c91a3cc604139d6727644..3afa1e2155fcdf3895965d5abe444995dd87750c 100644 --- a/src/vs/editor/contrib/find/common/findController.ts +++ b/src/vs/editor/contrib/find/common/findController.ts @@ -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, EditorAction2, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions'; +import {ServicesAccessor, EditorKbExpr, 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'; @@ -230,7 +230,7 @@ export class CommonFindController extends Disposable implements editorCommon.IEd } } -export class StartFindAction extends EditorAction2 { +export class StartFindAction extends EditorAction { constructor() { super( @@ -257,7 +257,7 @@ export class StartFindAction extends EditorAction2 { } } -export abstract class MatchFindAction extends EditorAction2 { +export abstract class MatchFindAction extends EditorAction { constructor(id:string, label:string, alias:string) { super(id, label, alias, false); } @@ -320,7 +320,7 @@ export class PreviousMatchFindAction extends MatchFindAction { } } -export abstract class SelectionMatchFindAction extends EditorAction2 { +export abstract class SelectionMatchFindAction extends EditorAction { constructor(id:string, label:string, alias:string) { super(id, label, alias, false); @@ -386,7 +386,7 @@ export class PreviousSelectionMatchFindAction extends SelectionMatchFindAction { } } -export class StartFindReplaceAction extends EditorAction2 { +export class StartFindReplaceAction extends EditorAction { constructor() { super( @@ -472,7 +472,7 @@ function multiCursorFind(editor:editorCommon.ICommonCodeEditor, changeFindSearch }; } -export abstract class SelectNextFindMatchAction extends EditorAction2 { +export abstract class SelectNextFindMatchAction extends EditorAction { constructor(id:string, label:string, alias:string) { super(id, label, alias, false); @@ -500,7 +500,7 @@ export abstract class SelectNextFindMatchAction extends EditorAction2 { } } -export abstract class SelectPreviousFindMatchAction extends EditorAction2 { +export abstract class SelectPreviousFindMatchAction extends EditorAction { constructor(id:string, label:string, alias:string) { super(id, label, alias, false); @@ -632,7 +632,7 @@ export class MoveSelectionToPreviousFindMatchAction extends SelectPreviousFindMa } } -export abstract class AbstractSelectHighlightsAction extends EditorAction2 { +export abstract class AbstractSelectHighlightsAction extends EditorAction { constructor(id:string, label:string, alias:string) { super(id, label, alias, false); @@ -856,22 +856,22 @@ export class SelectionHighlighter extends Disposable implements editorCommon.IEd } -CommonEditorRegistry.registerEditorAction2(new SelectHighlightsAction()); +CommonEditorRegistry.registerEditorAction(new SelectHighlightsAction()); // register SelectHighlightsAction again to replace the now removed Change All action -CommonEditorRegistry.registerEditorAction2(new CompatChangeAll()); +CommonEditorRegistry.registerEditorAction(new CompatChangeAll()); // register actions -CommonEditorRegistry.registerEditorAction2(new StartFindAction()); -CommonEditorRegistry.registerEditorAction2(new NextMatchFindAction()); -CommonEditorRegistry.registerEditorAction2(new PreviousMatchFindAction()); -CommonEditorRegistry.registerEditorAction2(new NextSelectionMatchFindAction()); -CommonEditorRegistry.registerEditorAction2(new PreviousSelectionMatchFindAction()); -CommonEditorRegistry.registerEditorAction2(new StartFindReplaceAction()); -CommonEditorRegistry.registerEditorAction2(new MoveSelectionToNextFindMatchAction()); -CommonEditorRegistry.registerEditorAction2(new MoveSelectionToPreviousFindMatchAction()); - -CommonEditorRegistry.registerEditorAction2(new AddSelectionToNextFindMatchAction()); -CommonEditorRegistry.registerEditorAction2(new AddSelectionToPreviousFindMatchAction()); +CommonEditorRegistry.registerEditorAction(new StartFindAction()); +CommonEditorRegistry.registerEditorAction(new NextMatchFindAction()); +CommonEditorRegistry.registerEditorAction(new PreviousMatchFindAction()); +CommonEditorRegistry.registerEditorAction(new NextSelectionMatchFindAction()); +CommonEditorRegistry.registerEditorAction(new PreviousSelectionMatchFindAction()); +CommonEditorRegistry.registerEditorAction(new StartFindReplaceAction()); +CommonEditorRegistry.registerEditorAction(new MoveSelectionToNextFindMatchAction()); +CommonEditorRegistry.registerEditorAction(new MoveSelectionToPreviousFindMatchAction()); + +CommonEditorRegistry.registerEditorAction(new AddSelectionToNextFindMatchAction()); +CommonEditorRegistry.registerEditorAction(new AddSelectionToPreviousFindMatchAction()); function registerFindCommand(id:string, callback:(controller:CommonFindController)=>void, keybindings:IKeybindings, needsKey:string = null): void { CommonEditorRegistry.registerEditorCommand(id, CommonEditorRegistry.commandWeight(5), keybindings, false, needsKey, (ctx, editor, args) => { diff --git a/src/vs/editor/contrib/folding/browser/folding.ts b/src/vs/editor/contrib/folding/browser/folding.ts index 935e440ce52a77226c26e1c0848873c89fb6f674..6abff38066b0342676cbca58de95d204cd88d374 100644 --- a/src/vs/editor/contrib/folding/browser/folding.ts +++ b/src/vs/editor/contrib/folding/browser/folding.ts @@ -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, EditorAction2, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions'; +import {ServicesAccessor, EditorKbExpr, 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'; @@ -646,7 +646,7 @@ export class FoldingController implements editorCommon.IEditorContribution { } } -abstract class FoldingAction2 extends EditorAction2 { +abstract class FoldingAction2 extends EditorAction { constructor(id:string, label:string, alias:string, keybinding:number) { super(id, label, alias, false); @@ -784,13 +784,13 @@ class FoldLevelAction extends FoldingAction2 { EditorBrowserRegistry.registerEditorContribution(FoldingController); -CommonEditorRegistry.registerEditorAction2(new UnfoldAction()); -CommonEditorRegistry.registerEditorAction2(new UnFoldRecursivelyAction()); -CommonEditorRegistry.registerEditorAction2(new FoldAction()); -CommonEditorRegistry.registerEditorAction2(new FoldRecursivelyAction()); -CommonEditorRegistry.registerEditorAction2(new FoldAllAction()); -CommonEditorRegistry.registerEditorAction2(new UnfoldAllAction()); -CommonEditorRegistry.registerEditorAction2( +CommonEditorRegistry.registerEditorAction(new UnfoldAction()); +CommonEditorRegistry.registerEditorAction(new UnFoldRecursivelyAction()); +CommonEditorRegistry.registerEditorAction(new FoldAction()); +CommonEditorRegistry.registerEditorAction(new FoldRecursivelyAction()); +CommonEditorRegistry.registerEditorAction(new FoldAllAction()); +CommonEditorRegistry.registerEditorAction(new UnfoldAllAction()); +CommonEditorRegistry.registerEditorAction( new FoldLevelAction( FoldLevelAction.ID(1), nls.localize('foldLevel1Action.label', "Fold Level 1"), @@ -798,7 +798,7 @@ CommonEditorRegistry.registerEditorAction2( KeyMod.chord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_1) ) ); -CommonEditorRegistry.registerEditorAction2( +CommonEditorRegistry.registerEditorAction( new FoldLevelAction( FoldLevelAction.ID(2), nls.localize('foldLevel2Action.label', "Fold Level 2"), @@ -806,7 +806,7 @@ CommonEditorRegistry.registerEditorAction2( KeyMod.chord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_2) ) ); -CommonEditorRegistry.registerEditorAction2( +CommonEditorRegistry.registerEditorAction( new FoldLevelAction( FoldLevelAction.ID(3), nls.localize('foldLevel3Action.label', "Fold Level 3"), @@ -814,7 +814,7 @@ CommonEditorRegistry.registerEditorAction2( KeyMod.chord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_3) ) ); -CommonEditorRegistry.registerEditorAction2( +CommonEditorRegistry.registerEditorAction( new FoldLevelAction( FoldLevelAction.ID(4), nls.localize('foldLevel4Action.label', "Fold Level 4"), @@ -822,7 +822,7 @@ CommonEditorRegistry.registerEditorAction2( KeyMod.chord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_4) ) ); -CommonEditorRegistry.registerEditorAction2( +CommonEditorRegistry.registerEditorAction( new FoldLevelAction( FoldLevelAction.ID(5), nls.localize('foldLevel5Action.label', "Fold Level 5"), diff --git a/src/vs/editor/contrib/format/common/formatActions.ts b/src/vs/editor/contrib/format/common/formatActions.ts index b00949e032cd5de854a498d699786a624ad12fc6..f80fa94012c916051740963dc21bad6d2f9b459b 100644 --- a/src/vs/editor/contrib/format/common/formatActions.ts +++ b/src/vs/editor/contrib/format/common/formatActions.ts @@ -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, EditorAction2, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions'; +import {ServicesAccessor, EditorKbExpr, 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'; @@ -132,7 +132,7 @@ class FormatOnType implements editorCommon.IEditorContribution { } } -export class FormatAction extends EditorAction2 { +export class FormatAction extends EditorAction { constructor() { super( @@ -223,5 +223,5 @@ export class FormatAction extends EditorAction2 { } // register action -CommonEditorRegistry.registerEditorAction2(new FormatAction()); +CommonEditorRegistry.registerEditorAction(new FormatAction()); CommonEditorRegistry.registerEditorContribution(FormatOnType); diff --git a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.ts b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.ts index 24072a2cbc3c207cef4023a1b14413e59c560039..7ea2b61b93004eed838c96b10cffe344d2e70009 100644 --- a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.ts +++ b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.ts @@ -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, EditorAction2, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions'; +import {ServicesAccessor, EditorKbExpr, 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'; @@ -45,7 +45,7 @@ export class DefinitionActionConfig { } } -export class DefinitionAction extends EditorAction2 { +export class DefinitionAction extends EditorAction { private _configuration: DefinitionActionConfig; @@ -517,8 +517,8 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC // register actions -CommonEditorRegistry.registerEditorAction2(new PeekDefinitionAction()); -CommonEditorRegistry.registerEditorAction2(new GoToDefinitionAction()); -CommonEditorRegistry.registerEditorAction2(new OpenDefinitionToSideAction()); +CommonEditorRegistry.registerEditorAction(new PeekDefinitionAction()); +CommonEditorRegistry.registerEditorAction(new GoToDefinitionAction()); +CommonEditorRegistry.registerEditorAction(new OpenDefinitionToSideAction()); EditorBrowserRegistry.registerEditorContribution(GotoDefinitionWithMouseEditorContribution); diff --git a/src/vs/editor/contrib/gotoError/browser/gotoError.ts b/src/vs/editor/contrib/gotoError/browser/gotoError.ts index c279946e3c98079ec2e23175f78b4098075f3034..a224049584bd4aefda2944b17f6547fe10aa7ac8 100644 --- a/src/vs/editor/contrib/gotoError/browser/gotoError.ts +++ b/src/vs/editor/contrib/gotoError/browser/gotoError.ts @@ -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, EditorAction2, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions'; +import {ServicesAccessor, EditorKbExpr, 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'; @@ -406,7 +406,7 @@ class MarkerNavigationWidget extends ZoneWidget { } } -class MarkerNavigationAction extends EditorAction2 { +class MarkerNavigationAction extends EditorAction { private _isNext: boolean; @@ -545,8 +545,8 @@ class PrevMarkerAction extends MarkerNavigationAction { var CONTEXT_MARKERS_NAVIGATION_VISIBLE = 'markersNavigationVisible'; // register actions -CommonEditorRegistry.registerEditorAction2(new NextMarkerAction()); -CommonEditorRegistry.registerEditorAction2(new PrevMarkerAction()); +CommonEditorRegistry.registerEditorAction(new NextMarkerAction()); +CommonEditorRegistry.registerEditorAction(new PrevMarkerAction()); CommonEditorRegistry.registerEditorCommand('closeMarkersNavigation', CommonEditorRegistry.commandWeight(50), { primary: KeyCode.Escape, secondary: [KeyMod.Shift | KeyCode.Escape] }, false, CONTEXT_MARKERS_NAVIGATION_VISIBLE, (ctx, editor, args) => { var controller = MarkerController.getMarkerController(editor); controller.closeMarkersNavigation(); diff --git a/src/vs/editor/contrib/hover/browser/hover.ts b/src/vs/editor/contrib/hover/browser/hover.ts index 94dc5ccdbb2670eade009978823d46b040928e00..a193e0c7bf2f873acaa38a7a204403b88e25f03b 100644 --- a/src/vs/editor/contrib/hover/browser/hover.ts +++ b/src/vs/editor/contrib/hover/browser/hover.ts @@ -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, EditorAction2, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions'; +import {ServicesAccessor, EditorKbExpr, 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'; @@ -141,7 +141,7 @@ class ModesHoverController implements editorCommon.IEditorContribution { } } -class ShowHoverAction extends EditorAction2 { +class ShowHoverAction extends EditorAction { constructor() { super( @@ -165,4 +165,4 @@ class ShowHoverAction extends EditorAction2 { } EditorBrowserRegistry.registerEditorContribution(ModesHoverController); -CommonEditorRegistry.registerEditorAction2(new ShowHoverAction()); +CommonEditorRegistry.registerEditorAction(new ShowHoverAction()); diff --git a/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.ts b/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.ts index 8d8e2d2a7c67fe7e12546fc94d1f1f7f37a36685..141b3376618983a60683f490ed15593626598fdf 100644 --- a/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.ts +++ b/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.ts @@ -9,7 +9,7 @@ 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, EditorAction2, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions'; +import {ServicesAccessor, EditorKbExpr, 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'; @@ -125,7 +125,7 @@ class InPlaceReplaceController implements IEditorContribution { } } -class InPlaceReplaceUp extends EditorAction2 { +class InPlaceReplaceUp extends EditorAction { constructor() { super( @@ -146,7 +146,7 @@ class InPlaceReplaceUp extends EditorAction2 { } } -class InPlaceReplaceDown extends EditorAction2 { +class InPlaceReplaceDown extends EditorAction { constructor() { super( @@ -168,5 +168,5 @@ class InPlaceReplaceDown extends EditorAction2 { } CommonEditorRegistry.registerEditorContribution(InPlaceReplaceController); -CommonEditorRegistry.registerEditorAction2(new InPlaceReplaceUp()); -CommonEditorRegistry.registerEditorAction2(new InPlaceReplaceDown()); +CommonEditorRegistry.registerEditorAction(new InPlaceReplaceUp()); +CommonEditorRegistry.registerEditorAction(new InPlaceReplaceDown()); diff --git a/src/vs/editor/contrib/indentation/common/indentation.ts b/src/vs/editor/contrib/indentation/common/indentation.ts index a096b9604cde23e1b13e802fde6ee724e6d96fae..5b47ce7bbca4f1a23a7d03efd9070759cf5213fc 100644 --- a/src/vs/editor/contrib/indentation/common/indentation.ts +++ b/src/vs/editor/contrib/indentation/common/indentation.ts @@ -6,12 +6,12 @@ import * as nls from 'vs/nls'; import {TPromise} from 'vs/base/common/winjs.base'; import {ICommonCodeEditor} from 'vs/editor/common/editorCommon'; -import {ServicesAccessor, EditorAction2, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions'; +import {ServicesAccessor, EditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions'; import {IndentationToSpacesCommand, IndentationToTabsCommand} from 'vs/editor/contrib/indentation/common/indentationCommands'; import {IQuickOpenService} from 'vs/workbench/services/quickopen/common/quickOpenService'; import {IModelService} from 'vs/editor/common/services/modelService'; -export class IndentationToSpacesAction extends EditorAction2 { +export class IndentationToSpacesAction extends EditorAction { static ID = 'editor.action.indentationToSpaces'; constructor() { @@ -37,7 +37,7 @@ export class IndentationToSpacesAction extends EditorAction2 { } } -export class IndentationToTabsAction extends EditorAction2 { +export class IndentationToTabsAction extends EditorAction { static ID = 'editor.action.indentationToTabs'; constructor() { @@ -63,7 +63,7 @@ export class IndentationToTabsAction extends EditorAction2 { } } -export class ChangeIndentationSizeAction extends EditorAction2 { +export class ChangeIndentationSizeAction extends EditorAction { constructor(id: string, label: string, alias: string, private insertSpaces: boolean) { super(id, label, alias, false); @@ -130,7 +130,7 @@ export class IndentUsingSpaces extends ChangeIndentationSizeAction { } } -export class DetectIndentation extends EditorAction2 { +export class DetectIndentation extends EditorAction { static ID = 'editor.action.detectIndentation'; @@ -156,7 +156,7 @@ export class DetectIndentation extends EditorAction2 { } } -export class ToggleRenderWhitespaceAction extends EditorAction2 { +export class ToggleRenderWhitespaceAction extends EditorAction { constructor() { super( @@ -174,7 +174,7 @@ export class ToggleRenderWhitespaceAction extends EditorAction2 { } } -export class ToggleRenderControlCharacterAction extends EditorAction2 { +export class ToggleRenderControlCharacterAction extends EditorAction { constructor() { super( @@ -193,10 +193,10 @@ export class ToggleRenderControlCharacterAction extends EditorAction2 { } // register actions -CommonEditorRegistry.registerEditorAction2(new IndentationToSpacesAction()); -CommonEditorRegistry.registerEditorAction2(new IndentationToTabsAction()); -CommonEditorRegistry.registerEditorAction2(new IndentUsingSpaces()); -CommonEditorRegistry.registerEditorAction2(new IndentUsingTabs()); -CommonEditorRegistry.registerEditorAction2(new DetectIndentation()); -CommonEditorRegistry.registerEditorAction2(new ToggleRenderWhitespaceAction()); -CommonEditorRegistry.registerEditorAction2(new ToggleRenderControlCharacterAction()); +CommonEditorRegistry.registerEditorAction(new IndentationToSpacesAction()); +CommonEditorRegistry.registerEditorAction(new IndentationToTabsAction()); +CommonEditorRegistry.registerEditorAction(new IndentUsingSpaces()); +CommonEditorRegistry.registerEditorAction(new IndentUsingTabs()); +CommonEditorRegistry.registerEditorAction(new DetectIndentation()); +CommonEditorRegistry.registerEditorAction(new ToggleRenderWhitespaceAction()); +CommonEditorRegistry.registerEditorAction(new ToggleRenderControlCharacterAction()); diff --git a/src/vs/editor/contrib/linesOperations/common/linesOperations.ts b/src/vs/editor/contrib/linesOperations/common/linesOperations.ts index 303af21ef328c4279d0e9a29dd1423c1f69fba67..8391b6d9340df9a5a9d62e4f329e23448b21b0bf 100644 --- a/src/vs/editor/contrib/linesOperations/common/linesOperations.ts +++ b/src/vs/editor/contrib/linesOperations/common/linesOperations.ts @@ -9,14 +9,14 @@ 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, EditorAction2, HandlerEditorAction2, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions'; +import {ServicesAccessor, EditorKbExpr, EditorAction, HandlerEditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions'; import {CopyLinesCommand} from './copyLinesCommand'; import {DeleteLinesCommand} from './deleteLinesCommand'; import {MoveLinesCommand} from './moveLinesCommand'; // copy lines -abstract class AbstractCopyLinesAction extends EditorAction2 { +abstract class AbstractCopyLinesAction extends EditorAction { private down:boolean; @@ -74,7 +74,7 @@ class CopyLinesDownAction extends AbstractCopyLinesAction { // move lines -abstract class AbstractMoveLinesAction extends EditorAction2 { +abstract class AbstractMoveLinesAction extends EditorAction { private down:boolean; @@ -130,7 +130,7 @@ class MoveLinesDownAction extends AbstractMoveLinesAction { } } -abstract class AbstractSortLinesAction extends EditorAction2 { +abstract class AbstractSortLinesAction extends EditorAction { private descending:boolean; constructor(id:string, label:string, alias:string, descending:boolean) { @@ -182,7 +182,7 @@ class SortLinesDescendingAction extends AbstractSortLinesAction { } } -export class TrimTrailingWhitespaceAction extends EditorAction2 { +export class TrimTrailingWhitespaceAction extends EditorAction { static ID = 'editor.action.trimTrailingWhitespace'; @@ -216,7 +216,7 @@ interface IDeleteLinesOperation { positionColumn:number; } -abstract class AbstractRemoveLinesAction extends EditorAction2 { +abstract class AbstractRemoveLinesAction extends EditorAction { constructor(id:string, label:string, alias:string) { super(id, label, alias, true); @@ -292,7 +292,7 @@ class DeleteLinesAction extends AbstractRemoveLinesAction { } } -class IndentLinesAction extends HandlerEditorAction2 { +class IndentLinesAction extends HandlerEditorAction { constructor() { super( 'editor.action.indentLines', @@ -309,7 +309,7 @@ class IndentLinesAction extends HandlerEditorAction2 { } } -class OutdentLinesAction extends HandlerEditorAction2 { +class OutdentLinesAction extends HandlerEditorAction { constructor() { super( 'editor.action.outdentLines', @@ -326,7 +326,7 @@ class OutdentLinesAction extends HandlerEditorAction2 { } } -class InsertLineBeforeAction extends HandlerEditorAction2 { +class InsertLineBeforeAction extends HandlerEditorAction { constructor() { super( 'editor.action.insertLineBefore', @@ -343,7 +343,7 @@ class InsertLineBeforeAction extends HandlerEditorAction2 { } } -class InsertLineAfterAction extends HandlerEditorAction2 { +class InsertLineAfterAction extends HandlerEditorAction { constructor() { super( 'editor.action.insertLineAfter', @@ -361,15 +361,15 @@ class InsertLineAfterAction extends HandlerEditorAction2 { } // register actions -CommonEditorRegistry.registerEditorAction2(new DeleteLinesAction()); -CommonEditorRegistry.registerEditorAction2(new SortLinesAscendingAction()); -CommonEditorRegistry.registerEditorAction2(new SortLinesDescendingAction()); -CommonEditorRegistry.registerEditorAction2(new TrimTrailingWhitespaceAction()); -CommonEditorRegistry.registerEditorAction2(new MoveLinesDownAction()); -CommonEditorRegistry.registerEditorAction2(new MoveLinesUpAction()); -CommonEditorRegistry.registerEditorAction2(new CopyLinesDownAction()); -CommonEditorRegistry.registerEditorAction2(new CopyLinesUpAction()); -CommonEditorRegistry.registerEditorAction2(new IndentLinesAction()); -CommonEditorRegistry.registerEditorAction2(new OutdentLinesAction()); -CommonEditorRegistry.registerEditorAction2(new InsertLineBeforeAction()); -CommonEditorRegistry.registerEditorAction2(new InsertLineAfterAction()); +CommonEditorRegistry.registerEditorAction(new DeleteLinesAction()); +CommonEditorRegistry.registerEditorAction(new SortLinesAscendingAction()); +CommonEditorRegistry.registerEditorAction(new SortLinesDescendingAction()); +CommonEditorRegistry.registerEditorAction(new TrimTrailingWhitespaceAction()); +CommonEditorRegistry.registerEditorAction(new MoveLinesDownAction()); +CommonEditorRegistry.registerEditorAction(new MoveLinesUpAction()); +CommonEditorRegistry.registerEditorAction(new CopyLinesDownAction()); +CommonEditorRegistry.registerEditorAction(new CopyLinesUpAction()); +CommonEditorRegistry.registerEditorAction(new IndentLinesAction()); +CommonEditorRegistry.registerEditorAction(new OutdentLinesAction()); +CommonEditorRegistry.registerEditorAction(new InsertLineBeforeAction()); +CommonEditorRegistry.registerEditorAction(new InsertLineAfterAction()); diff --git a/src/vs/editor/contrib/links/browser/links.ts b/src/vs/editor/contrib/links/browser/links.ts index de4fe30e9f3ba920e3c673feff051d7b64753ab2..66feaa7cfdfb5a2aa58e97c8618cd46e3d09f9ac 100644 --- a/src/vs/editor/contrib/links/browser/links.ts +++ b/src/vs/editor/contrib/links/browser/links.ts @@ -16,7 +16,7 @@ import {IKeyboardEvent} from 'vs/base/browser/keyboardEvent'; import {IMessageService} from 'vs/platform/message/common/message'; import {IOpenerService} from 'vs/platform/opener/common/opener'; import * as editorCommon from 'vs/editor/common/editorCommon'; -import {ServicesAccessor, EditorAction2, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions'; +import {ServicesAccessor, EditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions'; import {LinkProviderRegistry} from 'vs/editor/common/modes'; import {IEditorWorkerService} from 'vs/editor/common/services/editorWorkerService'; import {IEditorMouseEvent, ICodeEditor} from 'vs/editor/browser/editorBrowser'; @@ -315,7 +315,7 @@ class LinkDetector implements editorCommon.IEditorContribution { } } -class OpenLinkAction extends EditorAction2 { +class OpenLinkAction extends EditorAction { constructor() { super( @@ -344,5 +344,5 @@ class OpenLinkAction extends EditorAction2 { } } -CommonEditorRegistry.registerEditorAction2(new OpenLinkAction()); +CommonEditorRegistry.registerEditorAction(new OpenLinkAction()); EditorBrowserRegistry.registerEditorContribution(LinkDetector); diff --git a/src/vs/editor/contrib/multicursor/common/multicursor.ts b/src/vs/editor/contrib/multicursor/common/multicursor.ts index 47dd209a1b8e513cb4b9a16eefa21d0fdba264c2..0421076e63a624d961bbbedfb96dc403af289016 100644 --- a/src/vs/editor/contrib/multicursor/common/multicursor.ts +++ b/src/vs/editor/contrib/multicursor/common/multicursor.ts @@ -7,9 +7,9 @@ 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, EditorAction2, HandlerEditorAction2, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions'; +import {ServicesAccessor, EditorKbExpr, EditorAction, HandlerEditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions'; -class InsertCursorAbove extends HandlerEditorAction2 { +class InsertCursorAbove extends HandlerEditorAction { constructor() { super( 'editor.action.insertCursorAbove', @@ -30,7 +30,7 @@ class InsertCursorAbove extends HandlerEditorAction2 { } } -class InsertCursorBelow extends HandlerEditorAction2 { +class InsertCursorBelow extends HandlerEditorAction { constructor() { super( 'editor.action.insertCursorBelow', @@ -51,7 +51,7 @@ class InsertCursorBelow extends HandlerEditorAction2 { } } -class InsertCursorAtEndOfEachLineSelected extends EditorAction2 { +class InsertCursorAtEndOfEachLineSelected extends EditorAction { constructor() { super( @@ -101,6 +101,6 @@ class InsertCursorAtEndOfEachLineSelected extends EditorAction2 { // register actions -CommonEditorRegistry.registerEditorAction2(new InsertCursorAbove()); -CommonEditorRegistry.registerEditorAction2(new InsertCursorBelow()); -CommonEditorRegistry.registerEditorAction2(new InsertCursorAtEndOfEachLineSelected()); +CommonEditorRegistry.registerEditorAction(new InsertCursorAbove()); +CommonEditorRegistry.registerEditorAction(new InsertCursorBelow()); +CommonEditorRegistry.registerEditorAction(new InsertCursorAtEndOfEachLineSelected()); diff --git a/src/vs/editor/contrib/parameterHints/browser/parameterHints.ts b/src/vs/editor/contrib/parameterHints/browser/parameterHints.ts index c1454f9d24fe57ece1e3c825b1e7e800e84352ba..df3988df05e0af7d965a314e5a09fe59cf97b3d9 100644 --- a/src/vs/editor/contrib/parameterHints/browser/parameterHints.ts +++ b/src/vs/editor/contrib/parameterHints/browser/parameterHints.ts @@ -12,7 +12,7 @@ import { ICommonCodeEditor, IEditorContribution, KEYBINDING_CONTEXT_EDITOR_TEXT_ 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, EditorAction2, CommonEditorRegistry } from 'vs/editor/common/editorCommonExtensions'; +import { ServicesAccessor, EditorKbExpr, 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'; @@ -60,7 +60,7 @@ class ParameterHintsController implements IEditorContribution { } } -export class TriggerParameterHintsAction extends EditorAction2 { +export class TriggerParameterHintsAction extends EditorAction { constructor() { super( @@ -98,7 +98,7 @@ function handler(id: string, fn: (controller: ParameterHintsController) => void) EditorBrowserRegistry.registerEditorContribution(ParameterHintsController); -CommonEditorRegistry.registerEditorAction2(new TriggerParameterHintsAction()); +CommonEditorRegistry.registerEditorAction(new TriggerParameterHintsAction()); KeybindingsRegistry.registerCommandDesc({ id: 'closeParameterHints', diff --git a/src/vs/editor/contrib/quickFix/browser/quickFix.ts b/src/vs/editor/contrib/quickFix/browser/quickFix.ts index 776c190ee069f47c4943ee89539dc8583e5e761c..10b017abc93a4256586179e10a88195ed42a2250 100644 --- a/src/vs/editor/contrib/quickFix/browser/quickFix.ts +++ b/src/vs/editor/contrib/quickFix/browser/quickFix.ts @@ -14,7 +14,7 @@ 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, EditorAction2, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions'; +import {ServicesAccessor, EditorKbExpr, 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'; @@ -115,7 +115,7 @@ export class QuickFixController implements IEditorContribution { } } -export class QuickFixAction extends EditorAction2 { +export class QuickFixAction extends EditorAction { constructor() { super( @@ -148,7 +148,7 @@ var CONTEXT_QUICK_FIX_WIDGET_VISIBLE = 'quickFixWidgetVisible'; var weight = CommonEditorRegistry.commandWeight(80); // register action -CommonEditorRegistry.registerEditorAction2(new QuickFixAction()); +CommonEditorRegistry.registerEditorAction(new QuickFixAction()); CommonEditorRegistry.registerEditorCommand('acceptQuickFixSuggestion', weight, { primary: KeyCode.Enter, secondary: [KeyCode.Tab] }, false, CONTEXT_QUICK_FIX_WIDGET_VISIBLE,(ctx, editor, args) => { var controller = QuickFixController.getQuickFixController(editor); controller.acceptSelectedSuggestion(); diff --git a/src/vs/editor/contrib/quickOpen/browser/editorQuickOpen.ts b/src/vs/editor/contrib/quickOpen/browser/editorQuickOpen.ts index 7dcbd16a42b7e6eb68ded41608cc4507f8b46733..793bbdfa88575e6792f2ef90bd7babad3e8c046f 100644 --- a/src/vs/editor/contrib/quickOpen/browser/editorQuickOpen.ts +++ b/src/vs/editor/contrib/quickOpen/browser/editorQuickOpen.ts @@ -11,7 +11,7 @@ import {ICodeEditor} from 'vs/editor/browser/editorBrowser'; import {EditorBrowserRegistry} from 'vs/editor/browser/editorBrowserExtensions'; import {QuickOpenEditorWidget} from './quickOpenEditorWidget'; import {Selection} from 'vs/editor/common/core/selection'; -import {EditorAction2} from 'vs/editor/common/editorCommonExtensions'; +import {EditorAction} from 'vs/editor/common/editorCommonExtensions'; export interface IQuickOpenControllerOpts { inputAriaLabel: string; @@ -138,7 +138,7 @@ export interface IQuickOpenOpts { /** * Base class for providing quick open in the editor. */ -export abstract class BaseEditorQuickOpenAction extends EditorAction2 { +export abstract class BaseEditorQuickOpenAction extends EditorAction { private _inputAriaLabel:string; diff --git a/src/vs/editor/contrib/quickOpen/browser/gotoLine.contribution.ts b/src/vs/editor/contrib/quickOpen/browser/gotoLine.contribution.ts index 7c18a1b0528d1b2d80753e47351281776464f1ce..988fb94b4586229a5eef8b84e9cc5209b6ae25bd 100644 --- a/src/vs/editor/contrib/quickOpen/browser/gotoLine.contribution.ts +++ b/src/vs/editor/contrib/quickOpen/browser/gotoLine.contribution.ts @@ -8,4 +8,4 @@ import {CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions'; import {GotoLineAction} from './gotoLine'; // Contribute Ctrl+G to "Go to line" using quick open -CommonEditorRegistry.registerEditorAction2(new GotoLineAction()); \ No newline at end of file +CommonEditorRegistry.registerEditorAction(new GotoLineAction()); \ No newline at end of file diff --git a/src/vs/editor/contrib/quickOpen/browser/quickCommand.contribution.ts b/src/vs/editor/contrib/quickOpen/browser/quickCommand.contribution.ts index 05d8fc435f070daedbb27de4a992405da33b8047..11ded4cd2fc63b1c3e3849fd2a20490196958906 100644 --- a/src/vs/editor/contrib/quickOpen/browser/quickCommand.contribution.ts +++ b/src/vs/editor/contrib/quickOpen/browser/quickCommand.contribution.ts @@ -8,4 +8,4 @@ import {CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions'; import {QuickCommandAction} from './quickCommand'; // Contribute "Quick Command" to context menu -CommonEditorRegistry.registerEditorAction2(new QuickCommandAction()); +CommonEditorRegistry.registerEditorAction(new QuickCommandAction()); diff --git a/src/vs/editor/contrib/quickOpen/browser/quickOutline.contribution.ts b/src/vs/editor/contrib/quickOpen/browser/quickOutline.contribution.ts index f20834d7ee38e1304bc03303703fa80fbbeca8a0..e4a6b39fdd6878773555b27e3aad981025a09914 100644 --- a/src/vs/editor/contrib/quickOpen/browser/quickOutline.contribution.ts +++ b/src/vs/editor/contrib/quickOpen/browser/quickOutline.contribution.ts @@ -8,4 +8,4 @@ import {CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions'; import {QuickOutlineAction} from './quickOutline'; // Contribute "Quick Outline" to context menu -CommonEditorRegistry.registerEditorAction2(new QuickOutlineAction()); +CommonEditorRegistry.registerEditorAction(new QuickOutlineAction()); diff --git a/src/vs/editor/contrib/referenceSearch/browser/referenceSearch.ts b/src/vs/editor/contrib/referenceSearch/browser/referenceSearch.ts index 71a825fff9f643425d808141ea6d2cffaac1789b..811ab3f1b7d1d465f92650ed3a51d76371665bd8 100644 --- a/src/vs/editor/contrib/referenceSearch/browser/referenceSearch.ts +++ b/src/vs/editor/contrib/referenceSearch/browser/referenceSearch.ts @@ -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, EditorAction2, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions'; +import {ServicesAccessor, EditorKbExpr, 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'; @@ -52,7 +52,7 @@ export class ReferenceController implements editorCommon.IEditorContribution { } } -export class ReferenceAction extends EditorAction2 { +export class ReferenceAction extends EditorAction { constructor() { super( @@ -151,7 +151,7 @@ let showReferencesCommand: ICommandHandler = (accessor:ServicesAccessor, resourc // register action CommonEditorRegistry.registerEditorContribution(ReferenceController); -CommonEditorRegistry.registerEditorAction2(new ReferenceAction()); +CommonEditorRegistry.registerEditorAction(new ReferenceAction()); KeybindingsRegistry.registerCommandDesc({ id: 'editor.action.findReferences', diff --git a/src/vs/editor/contrib/rename/browser/rename.ts b/src/vs/editor/contrib/rename/browser/rename.ts index 6e65859939206452e648adaf68431d77baf81e52..56d2a07ed01b5d36d7ad8f2ca4256cc4ef6620fc 100644 --- a/src/vs/editor/contrib/rename/browser/rename.ts +++ b/src/vs/editor/contrib/rename/browser/rename.ts @@ -16,7 +16,7 @@ import {IKeybindingContextKey, IKeybindingService, KbExpr} from 'vs/platform/key 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, EditorAction2, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions'; +import {ServicesAccessor, EditorKbExpr, 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'; @@ -147,7 +147,7 @@ class RenameController implements IEditorContribution { // ---- action implementation -export class RenameAction extends EditorAction2 { +export class RenameAction extends EditorAction { constructor() { super( @@ -192,7 +192,7 @@ EditorBrowserRegistry.registerEditorContribution(RenameController); const weight = CommonEditorRegistry.commandWeight(99); -CommonEditorRegistry.registerEditorAction2(new RenameAction()); +CommonEditorRegistry.registerEditorAction(new RenameAction()); CommonEditorRegistry.registerEditorCommand('acceptRenameInput', weight, { primary: KeyCode.Enter }, false, CONTEXT_RENAME_INPUT_VISIBLE, (ctx, editor, args) => { RenameController.get(editor).acceptRenameInput(); diff --git a/src/vs/editor/contrib/smartSelect/common/jumpToBracket.ts b/src/vs/editor/contrib/smartSelect/common/jumpToBracket.ts index 668acf8f8bef399c3f4bfd3e8ef61ea6a1d5db56..38a8e07bdbe133a8855f44ccf29bea436644913a 100644 --- a/src/vs/editor/contrib/smartSelect/common/jumpToBracket.ts +++ b/src/vs/editor/contrib/smartSelect/common/jumpToBracket.ts @@ -7,9 +7,9 @@ import * as nls from 'vs/nls'; import {KeyCode, KeyMod} from 'vs/base/common/keyCodes'; import {Handler} from 'vs/editor/common/editorCommon'; -import {EditorKbExpr, HandlerEditorAction2, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions'; +import {EditorKbExpr, HandlerEditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions'; -class SelectBracketAction extends HandlerEditorAction2 { +class SelectBracketAction extends HandlerEditorAction { static ID = 'editor.action.jumpToBracket'; @@ -30,4 +30,4 @@ class SelectBracketAction extends HandlerEditorAction2 { } // register actions -CommonEditorRegistry.registerEditorAction2(new SelectBracketAction()); +CommonEditorRegistry.registerEditorAction(new SelectBracketAction()); diff --git a/src/vs/editor/contrib/smartSelect/common/smartSelect.ts b/src/vs/editor/contrib/smartSelect/common/smartSelect.ts index 722241f498f8a47dcad1214a8b55b50d0e278ff0..e8b0823dc5014ab5e9fe62a4b338cb80af25eb3d 100644 --- a/src/vs/editor/contrib/smartSelect/common/smartSelect.ts +++ b/src/vs/editor/contrib/smartSelect/common/smartSelect.ts @@ -11,7 +11,7 @@ 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, EditorAction2, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions'; +import {ServicesAccessor, EditorKbExpr, EditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions'; import {TokenSelectionSupport, ILogicalSelectionEntry} from './tokenSelectionSupport'; // --- selection state machine @@ -142,7 +142,7 @@ class SmartSelectController implements IEditorContribution { } } -abstract class AbstractSmartSelect extends EditorAction2 { +abstract class AbstractSmartSelect extends EditorAction { private _forward: boolean; @@ -192,5 +192,5 @@ class ShrinkSelectionAction extends AbstractSmartSelect { // register actions CommonEditorRegistry.registerEditorContribution(SmartSelectController); -CommonEditorRegistry.registerEditorAction2(new GrowSelectionAction()); -CommonEditorRegistry.registerEditorAction2(new ShrinkSelectionAction()); +CommonEditorRegistry.registerEditorAction(new GrowSelectionAction()); +CommonEditorRegistry.registerEditorAction(new ShrinkSelectionAction()); diff --git a/src/vs/editor/contrib/suggest/browser/suggest.ts b/src/vs/editor/contrib/suggest/browser/suggest.ts index 02f8e67a76477d567801fc191839f5e724e16045..b68f08688a4b2320e408946d2d4ae1145f6bf473 100644 --- a/src/vs/editor/contrib/suggest/browser/suggest.ts +++ b/src/vs/editor/contrib/suggest/browser/suggest.ts @@ -10,7 +10,7 @@ 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, EditorAction2, CommonEditorRegistry } from 'vs/editor/common/editorCommonExtensions'; +import { ServicesAccessor, EditorKbExpr, 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'; @@ -169,7 +169,7 @@ export class SuggestController implements IEditorContribution { } } -export class TriggerSuggestAction extends EditorAction2 { +export class TriggerSuggestAction extends EditorAction { static ID: string = 'editor.action.triggerSuggest'; @@ -200,7 +200,7 @@ export class TriggerSuggestAction extends EditorAction2 { } } -CommonEditorRegistry.registerEditorAction2(new TriggerSuggestAction()); +CommonEditorRegistry.registerEditorAction(new TriggerSuggestAction()); const weight = CommonEditorRegistry.commandWeight(90); diff --git a/src/vs/editor/contrib/suggest/electron-browser/snippetCompletion.ts b/src/vs/editor/contrib/suggest/electron-browser/snippetCompletion.ts index 6c10c16bdc12e021ded6eb883f4775069dbafa77..9e1076ea80f6bf2ad4ab988f8f1784111cb55cee 100644 --- a/src/vs/editor/contrib/suggest/electron-browser/snippetCompletion.ts +++ b/src/vs/editor/contrib/suggest/electron-browser/snippetCompletion.ts @@ -8,7 +8,7 @@ import * as nls from 'vs/nls'; import {Registry} from 'vs/platform/platform'; import {TPromise} from 'vs/base/common/winjs.base'; import {ICommonCodeEditor} from 'vs/editor/common/editorCommon'; -import {ServicesAccessor, EditorAction2, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions'; +import {ServicesAccessor, EditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions'; import {getSnippetController, CodeSnippet} from 'vs/editor/contrib/snippet/common/snippet'; import {IQuickOpenService, IPickOpenEntry} from 'vs/workbench/services/quickopen/common/quickOpenService'; import {ISnippetsRegistry, Extensions, ISnippet} from 'vs/editor/common/modes/snippetsRegistry'; @@ -17,7 +17,7 @@ interface ISnippetPick extends IPickOpenEntry { snippet: ISnippet; } -class ShowSnippetsActions extends EditorAction2 { +class ShowSnippetsActions extends EditorAction { constructor() { super( @@ -53,4 +53,4 @@ class ShowSnippetsActions extends EditorAction2 { } } -CommonEditorRegistry.registerEditorAction2(new ShowSnippetsActions()); +CommonEditorRegistry.registerEditorAction(new ShowSnippetsActions()); diff --git a/src/vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode.ts b/src/vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode.ts index 6fc156b18d75349f383dc1db96f731c047033416..4bf923ad040af4f41fd950d5bd3e5b1885a05c7a 100644 --- a/src/vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode.ts +++ b/src/vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode.ts @@ -7,11 +7,11 @@ import * as nls from 'vs/nls'; import {KeyCode, KeyMod} from 'vs/base/common/keyCodes'; import {ICommonCodeEditor} from 'vs/editor/common/editorCommon'; -import {ServicesAccessor, EditorAction2, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions'; +import {ServicesAccessor, EditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions'; import {TabFocus} from 'vs/editor/common/config/commonEditorConfig'; import {KeybindingsRegistry} from 'vs/platform/keybinding/common/keybindingsRegistry'; -export class ToggleTabFocusModeAction extends EditorAction2 { +export class ToggleTabFocusModeAction extends EditorAction { public static ID = 'editor.action.toggleTabFocusMode'; @@ -31,7 +31,7 @@ export class ToggleTabFocusModeAction extends EditorAction2 { } // register actions -CommonEditorRegistry.registerEditorAction2(new ToggleTabFocusModeAction()); +CommonEditorRegistry.registerEditorAction(new ToggleTabFocusModeAction()); KeybindingsRegistry.registerCommandRule({ id: ToggleTabFocusModeAction.ID, diff --git a/src/vs/editor/contrib/toggleWordWrap/common/toggleWordWrap.ts b/src/vs/editor/contrib/toggleWordWrap/common/toggleWordWrap.ts index 290a58a2d0082c916cc732e8314cece4d37f0d76..e69b519480389eb438143fe6aefb08910508c9ae 100644 --- a/src/vs/editor/contrib/toggleWordWrap/common/toggleWordWrap.ts +++ b/src/vs/editor/contrib/toggleWordWrap/common/toggleWordWrap.ts @@ -7,9 +7,9 @@ import * as nls from 'vs/nls'; import {KeyCode, KeyMod} from 'vs/base/common/keyCodes'; import {ICommonCodeEditor} from 'vs/editor/common/editorCommon'; -import {ServicesAccessor, EditorKbExpr, EditorAction2, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions'; +import {ServicesAccessor, EditorKbExpr, EditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions'; -class ToggleWordWrapAction extends EditorAction2 { +class ToggleWordWrapAction extends EditorAction { constructor() { super( @@ -43,4 +43,4 @@ class ToggleWordWrapAction extends EditorAction2 { } // register actions -CommonEditorRegistry.registerEditorAction2(new ToggleWordWrapAction()); +CommonEditorRegistry.registerEditorAction(new ToggleWordWrapAction()); diff --git a/src/vs/workbench/parts/debug/browser/debugActions.ts b/src/vs/workbench/parts/debug/browser/debugActions.ts index ea37d303056a678870459318b96479d14a83d2e5..6a45fb753b0b16fbb463e364626c5fd60675e588 100644 --- a/src/vs/workbench/parts/debug/browser/debugActions.ts +++ b/src/vs/workbench/parts/debug/browser/debugActions.ts @@ -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, EditorAction2} from 'vs/editor/common/editorCommonExtensions'; +import {ServicesAccessor, EditorKbExpr, EditorAction} from 'vs/editor/common/editorCommonExtensions'; import {KeyMod, KeyCode} from 'vs/base/common/keyCodes'; import IDebugService = debug.IDebugService; @@ -516,7 +516,7 @@ export class EditConditionalBreakpointAction extends AbstractDebugAction { } } -export class ToggleBreakpointAction extends EditorAction2 { +export class ToggleBreakpointAction extends EditorAction { constructor() { super( 'editor.debug.action.toggleBreakpoint', @@ -546,7 +546,7 @@ export class ToggleBreakpointAction extends EditorAction2 { } } -export class EditorConditionalBreakpointAction extends EditorAction2 { +export class EditorConditionalBreakpointAction extends EditorAction { constructor() { super( @@ -590,7 +590,7 @@ export class SetValueAction extends AbstractDebugAction { } } -export class RunToCursorAction extends EditorAction2 { +export class RunToCursorAction extends EditorAction { constructor() { super( @@ -660,7 +660,7 @@ export class AddWatchExpressionAction extends AbstractDebugAction { } } -export class SelectionToReplAction extends EditorAction2 { +export class SelectionToReplAction extends EditorAction { constructor() { super( @@ -698,7 +698,7 @@ export class SelectionToReplAction extends EditorAction2 { } } -export class ShowDebugHoverAction extends EditorAction2 { +export class ShowDebugHoverAction extends EditorAction { constructor() { super( diff --git a/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts b/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts index 9327923eaae0b8cc9e8c44d0777f5ef760902a51..cd51e236d283425511e8e0e67cd7ebb46ef46e8e 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts @@ -50,11 +50,11 @@ class OpenDebugViewletAction extends viewlet.ToggleViewletAction { } EditorBrowserRegistry.registerEditorContribution(DebugEditorContribution); -CommonEditorRegistry.registerEditorAction2(new ToggleBreakpointAction()); -CommonEditorRegistry.registerEditorAction2(new ShowDebugHoverAction()); -CommonEditorRegistry.registerEditorAction2(new EditorConditionalBreakpointAction()); -CommonEditorRegistry.registerEditorAction2(new SelectionToReplAction()); -CommonEditorRegistry.registerEditorAction2(new RunToCursorAction()); +CommonEditorRegistry.registerEditorAction(new ToggleBreakpointAction()); +CommonEditorRegistry.registerEditorAction(new ShowDebugHoverAction()); +CommonEditorRegistry.registerEditorAction(new EditorConditionalBreakpointAction()); +CommonEditorRegistry.registerEditorAction(new SelectionToReplAction()); +CommonEditorRegistry.registerEditorAction(new RunToCursorAction()); // register viewlet (platform.Registry.as(viewlet.Extensions.Viewlets)).registerViewlet(new viewlet.ViewletDescriptor( diff --git a/src/vs/workbench/parts/emmet/node/actions/balance.ts b/src/vs/workbench/parts/emmet/node/actions/balance.ts index 3a1b3ba61f03344fc5dc05e410116cb704e57a79..8db40aee7815f6d2ad418cefbf6bdbe5a9777a09 100644 --- a/src/vs/workbench/parts/emmet/node/actions/balance.ts +++ b/src/vs/workbench/parts/emmet/node/actions/balance.ts @@ -32,5 +32,5 @@ class BalanceOutwardAction extends BasicEmmetEditorAction { } } -CommonEditorRegistry.registerEditorAction2(new BalanceInwardAction()); -CommonEditorRegistry.registerEditorAction2(new BalanceOutwardAction()); +CommonEditorRegistry.registerEditorAction(new BalanceInwardAction()); +CommonEditorRegistry.registerEditorAction(new BalanceOutwardAction()); diff --git a/src/vs/workbench/parts/emmet/node/actions/base64.ts b/src/vs/workbench/parts/emmet/node/actions/base64.ts index ddd00b3f4081b41196f6c36ff437811180f7de6d..11795ec76578fda1c47802ceb5ce73f83908798e 100644 --- a/src/vs/workbench/parts/emmet/node/actions/base64.ts +++ b/src/vs/workbench/parts/emmet/node/actions/base64.ts @@ -133,4 +133,4 @@ class EncodeDecodeDataUrlAction extends EmmetEditorAction { } } -CommonEditorRegistry.registerEditorAction2(new EncodeDecodeDataUrlAction()); +CommonEditorRegistry.registerEditorAction(new EncodeDecodeDataUrlAction()); diff --git a/src/vs/workbench/parts/emmet/node/actions/editPoints.ts b/src/vs/workbench/parts/emmet/node/actions/editPoints.ts index 8ad89392d7026f751a755b4b231013ff411fd332..ac90ce285250054b42b4255002f576fb5e105056 100644 --- a/src/vs/workbench/parts/emmet/node/actions/editPoints.ts +++ b/src/vs/workbench/parts/emmet/node/actions/editPoints.ts @@ -32,5 +32,5 @@ class NextEditPointAction extends BasicEmmetEditorAction { } } -CommonEditorRegistry.registerEditorAction2(new PreviousEditPointAction()); -CommonEditorRegistry.registerEditorAction2(new NextEditPointAction()); +CommonEditorRegistry.registerEditorAction(new PreviousEditPointAction()); +CommonEditorRegistry.registerEditorAction(new NextEditPointAction()); diff --git a/src/vs/workbench/parts/emmet/node/actions/evaluateMath.ts b/src/vs/workbench/parts/emmet/node/actions/evaluateMath.ts index 12c190a48888376e0fbdb25827c85edf98b6ad26..b22c474ca5b76eed22b9740b604a87d34be6ae68 100644 --- a/src/vs/workbench/parts/emmet/node/actions/evaluateMath.ts +++ b/src/vs/workbench/parts/emmet/node/actions/evaluateMath.ts @@ -21,4 +21,4 @@ class EvaluateMathAction extends BasicEmmetEditorAction { } } -CommonEditorRegistry.registerEditorAction2(new EvaluateMathAction()); +CommonEditorRegistry.registerEditorAction(new EvaluateMathAction()); diff --git a/src/vs/workbench/parts/emmet/node/actions/expandAbbreviation.ts b/src/vs/workbench/parts/emmet/node/actions/expandAbbreviation.ts index 71159d3afbee533f75f90bb68285e6f299fbc229..a8ac0a445158788144137dea8bebc7fe8cd5bcfd 100644 --- a/src/vs/workbench/parts/emmet/node/actions/expandAbbreviation.ts +++ b/src/vs/workbench/parts/emmet/node/actions/expandAbbreviation.ts @@ -42,4 +42,4 @@ class ExpandAbbreviationAction extends BasicEmmetEditorAction { } } -CommonEditorRegistry.registerEditorAction2(new ExpandAbbreviationAction()); +CommonEditorRegistry.registerEditorAction(new ExpandAbbreviationAction()); diff --git a/src/vs/workbench/parts/emmet/node/actions/incrementDecrement.ts b/src/vs/workbench/parts/emmet/node/actions/incrementDecrement.ts index e34fa867cde2047a4fa0eccd2a87b20afa7ed8f8..1007c0403423f9024e3171444c667aa0e88b63f6 100644 --- a/src/vs/workbench/parts/emmet/node/actions/incrementDecrement.ts +++ b/src/vs/workbench/parts/emmet/node/actions/incrementDecrement.ts @@ -76,9 +76,9 @@ class DecrementNumberByTenAction extends BasicEmmetEditorAction { } } -CommonEditorRegistry.registerEditorAction2(new IncrementNumberByOneTenthAction()); -CommonEditorRegistry.registerEditorAction2(new IncrementNumberByOneAction()); -CommonEditorRegistry.registerEditorAction2(new IncrementNumberByTenAction()); -CommonEditorRegistry.registerEditorAction2(new DecrementNumberByOneTenthAction()); -CommonEditorRegistry.registerEditorAction2(new DecrementNumberByOneAction()); -CommonEditorRegistry.registerEditorAction2(new DecrementNumberByTenAction()); +CommonEditorRegistry.registerEditorAction(new IncrementNumberByOneTenthAction()); +CommonEditorRegistry.registerEditorAction(new IncrementNumberByOneAction()); +CommonEditorRegistry.registerEditorAction(new IncrementNumberByTenAction()); +CommonEditorRegistry.registerEditorAction(new DecrementNumberByOneTenthAction()); +CommonEditorRegistry.registerEditorAction(new DecrementNumberByOneAction()); +CommonEditorRegistry.registerEditorAction(new DecrementNumberByTenAction()); diff --git a/src/vs/workbench/parts/emmet/node/actions/matchingPair.ts b/src/vs/workbench/parts/emmet/node/actions/matchingPair.ts index 0de16011a594e7ffe0c339dbd8f1dcbd2025fe73..5856c9ca25fd1d14496301b0f1df645de1f771cc 100644 --- a/src/vs/workbench/parts/emmet/node/actions/matchingPair.ts +++ b/src/vs/workbench/parts/emmet/node/actions/matchingPair.ts @@ -21,4 +21,4 @@ class GoToMatchingPairAction extends BasicEmmetEditorAction { } } -CommonEditorRegistry.registerEditorAction2(new GoToMatchingPairAction()); +CommonEditorRegistry.registerEditorAction(new GoToMatchingPairAction()); diff --git a/src/vs/workbench/parts/emmet/node/actions/mergeLines.ts b/src/vs/workbench/parts/emmet/node/actions/mergeLines.ts index 1336d6ab27e5baf5732a10ee59883a92eab1d929..65984eaf602f588455b4c5076f7ef9b48b91a239 100644 --- a/src/vs/workbench/parts/emmet/node/actions/mergeLines.ts +++ b/src/vs/workbench/parts/emmet/node/actions/mergeLines.ts @@ -21,4 +21,4 @@ class MergeLinesAction extends BasicEmmetEditorAction { } } -CommonEditorRegistry.registerEditorAction2(new MergeLinesAction()); +CommonEditorRegistry.registerEditorAction(new MergeLinesAction()); diff --git a/src/vs/workbench/parts/emmet/node/actions/reflectCssValue.ts b/src/vs/workbench/parts/emmet/node/actions/reflectCssValue.ts index 5fe5d4d54cdd53bb131807c55d36b11baec5e766..b65dfedaa1870c591b4b19f7715e080b2e8cb176 100644 --- a/src/vs/workbench/parts/emmet/node/actions/reflectCssValue.ts +++ b/src/vs/workbench/parts/emmet/node/actions/reflectCssValue.ts @@ -21,4 +21,4 @@ class ReflectCSSValueAction extends BasicEmmetEditorAction { } } -CommonEditorRegistry.registerEditorAction2(new ReflectCSSValueAction()); +CommonEditorRegistry.registerEditorAction(new ReflectCSSValueAction()); diff --git a/src/vs/workbench/parts/emmet/node/actions/removeTag.ts b/src/vs/workbench/parts/emmet/node/actions/removeTag.ts index 0219476626bb54fb26b0b50f01b8f492804db0aa..2cbd738015cce8732139cbcd66e8ad6738e4ad58 100644 --- a/src/vs/workbench/parts/emmet/node/actions/removeTag.ts +++ b/src/vs/workbench/parts/emmet/node/actions/removeTag.ts @@ -21,4 +21,4 @@ class RemoveTagAction extends BasicEmmetEditorAction { } } -CommonEditorRegistry.registerEditorAction2(new RemoveTagAction()); +CommonEditorRegistry.registerEditorAction(new RemoveTagAction()); diff --git a/src/vs/workbench/parts/emmet/node/actions/selectItem.ts b/src/vs/workbench/parts/emmet/node/actions/selectItem.ts index fa51ab84f434910b7ea9554b12d5a0c92439a94b..69ba3898a287fdc084ac32ebb0d2be39fc6ebb60 100644 --- a/src/vs/workbench/parts/emmet/node/actions/selectItem.ts +++ b/src/vs/workbench/parts/emmet/node/actions/selectItem.ts @@ -32,5 +32,5 @@ class SelectNextItemAction extends BasicEmmetEditorAction { } } -CommonEditorRegistry.registerEditorAction2(new SelectPreviousItemAction()); -CommonEditorRegistry.registerEditorAction2(new SelectNextItemAction()); +CommonEditorRegistry.registerEditorAction(new SelectPreviousItemAction()); +CommonEditorRegistry.registerEditorAction(new SelectNextItemAction()); diff --git a/src/vs/workbench/parts/emmet/node/actions/splitJoinTag.ts b/src/vs/workbench/parts/emmet/node/actions/splitJoinTag.ts index 6b9ab37ee1736f0f2a9dbd4e41abff7c5ccf421d..7fed4a8e887415c86c1345764afd7a357a5c7c00 100644 --- a/src/vs/workbench/parts/emmet/node/actions/splitJoinTag.ts +++ b/src/vs/workbench/parts/emmet/node/actions/splitJoinTag.ts @@ -21,4 +21,4 @@ class SplitJoinTagAction extends BasicEmmetEditorAction { } } -CommonEditorRegistry.registerEditorAction2(new SplitJoinTagAction()); +CommonEditorRegistry.registerEditorAction(new SplitJoinTagAction()); diff --git a/src/vs/workbench/parts/emmet/node/actions/toggleComment.ts b/src/vs/workbench/parts/emmet/node/actions/toggleComment.ts index 0c5f3c27c9f52a8120ac0b44ef697e3acdcd5b9c..c0ca16d8156ef4767d8a7cc28d5faedcdcebda4d 100644 --- a/src/vs/workbench/parts/emmet/node/actions/toggleComment.ts +++ b/src/vs/workbench/parts/emmet/node/actions/toggleComment.ts @@ -21,4 +21,4 @@ class ToggleCommentAction extends BasicEmmetEditorAction { } } -CommonEditorRegistry.registerEditorAction2(new ToggleCommentAction()); +CommonEditorRegistry.registerEditorAction(new ToggleCommentAction()); diff --git a/src/vs/workbench/parts/emmet/node/actions/updateImageSize.ts b/src/vs/workbench/parts/emmet/node/actions/updateImageSize.ts index 719c446de0bb69b36abb9afc60de66025d26bba5..1624665925602975f264c145067c3c5ec236550d 100644 --- a/src/vs/workbench/parts/emmet/node/actions/updateImageSize.ts +++ b/src/vs/workbench/parts/emmet/node/actions/updateImageSize.ts @@ -21,4 +21,4 @@ class UpdateImageSizeAction extends BasicEmmetEditorAction { } } -CommonEditorRegistry.registerEditorAction2(new UpdateImageSizeAction()); +CommonEditorRegistry.registerEditorAction(new UpdateImageSizeAction()); diff --git a/src/vs/workbench/parts/emmet/node/actions/updateTag.ts b/src/vs/workbench/parts/emmet/node/actions/updateTag.ts index f0eeea59fd83ea1865d3c506ba770cfe183f9561..53c095c2064ea682f41a1a41c443b42eee83f486 100644 --- a/src/vs/workbench/parts/emmet/node/actions/updateTag.ts +++ b/src/vs/workbench/parts/emmet/node/actions/updateTag.ts @@ -41,4 +41,4 @@ class UpdateTagAction extends EmmetEditorAction { } } -CommonEditorRegistry.registerEditorAction2(new UpdateTagAction()); +CommonEditorRegistry.registerEditorAction(new UpdateTagAction()); diff --git a/src/vs/workbench/parts/emmet/node/actions/wrapWithAbbreviation.ts b/src/vs/workbench/parts/emmet/node/actions/wrapWithAbbreviation.ts index fbe5f13dc474cb8459b00c4bc07ed869f3fdf4ee..d612edfbb8fe06991ff2d125853551cb077321a4 100644 --- a/src/vs/workbench/parts/emmet/node/actions/wrapWithAbbreviation.ts +++ b/src/vs/workbench/parts/emmet/node/actions/wrapWithAbbreviation.ts @@ -40,4 +40,4 @@ class WrapWithAbbreviationAction extends EmmetEditorAction { } } -CommonEditorRegistry.registerEditorAction2(new WrapWithAbbreviationAction()); +CommonEditorRegistry.registerEditorAction(new WrapWithAbbreviationAction()); diff --git a/src/vs/workbench/parts/emmet/node/emmetActions.ts b/src/vs/workbench/parts/emmet/node/emmetActions.ts index 995eaf206d6cb0f70213eacdf3baf00a085b1873..321304eb60fa04c7c39573ec360cd33ef7619d05 100644 --- a/src/vs/workbench/parts/emmet/node/emmetActions.ts +++ b/src/vs/workbench/parts/emmet/node/emmetActions.ts @@ -7,7 +7,7 @@ import {TPromise} from 'vs/base/common/winjs.base'; import {ICommonCodeEditor} from 'vs/editor/common/editorCommon'; -import {EditorAction2, ServicesAccessor} from 'vs/editor/common/editorCommonExtensions'; +import {EditorAction, ServicesAccessor} from 'vs/editor/common/editorCommonExtensions'; import {IInstantiationService} from 'vs/platform/instantiation/common/instantiation'; import {EditorAccessor} from 'vs/workbench/parts/emmet/node/editorAccessor'; @@ -97,7 +97,7 @@ export class EmmetActionContext { } } -export abstract class EmmetEditorAction extends EditorAction2 { +export abstract class EmmetEditorAction extends EditorAction { constructor(id:string, label:string, alias:string) { super(id, label, alias, true);