diff --git a/src/vs/editor/browser/editorExtensions.ts b/src/vs/editor/browser/editorExtensions.ts index 19bba6b8b47a4..5d9d14e828cc1 100644 --- a/src/vs/editor/browser/editorExtensions.ts +++ b/src/vs/editor/browser/editorExtensions.ts @@ -515,7 +515,7 @@ export function registerInstantiatedEditorAction(editorAction: EditorAction): vo EditorContributionRegistry.INSTANCE.registerEditorAction(editorAction); } -export function registerEditorContribution(id: string, ctor: { new(editor: ICodeEditor, ...services: Services): IEditorContribution }, instantiation = EditorContributionInstantiation.Eager): void { +export function registerEditorContribution(id: string, ctor: { new(editor: ICodeEditor, ...services: Services): IEditorContribution }, instantiation: EditorContributionInstantiation): void { EditorContributionRegistry.INSTANCE.registerEditorContribution(id, ctor, instantiation); } @@ -567,7 +567,7 @@ class EditorContributionRegistry { this.editorCommands = Object.create(null); } - public registerEditorContribution(id: string, ctor: { new(editor: ICodeEditor, ...services: Services): IEditorContribution }, instantiation = EditorContributionInstantiation.Eager): void { + public registerEditorContribution(id: string, ctor: { new(editor: ICodeEditor, ...services: Services): IEditorContribution }, instantiation: EditorContributionInstantiation): void { this.editorContributions.push({ id, ctor: ctor as IEditorContributionCtor, instantiation }); } diff --git a/src/vs/editor/contrib/inlineCompletions/browser/ghostText.contribution.ts b/src/vs/editor/contrib/inlineCompletions/browser/ghostText.contribution.ts index 38151191829ff..291d17d610234 100644 --- a/src/vs/editor/contrib/inlineCompletions/browser/ghostText.contribution.ts +++ b/src/vs/editor/contrib/inlineCompletions/browser/ghostText.contribution.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { KeyCode } from 'vs/base/common/keyCodes'; -import { EditorCommand, registerEditorAction, registerEditorCommand, registerEditorContribution } from 'vs/editor/browser/editorExtensions'; +import { EditorCommand, EditorContributionInstantiation, registerEditorAction, registerEditorCommand, registerEditorContribution } from 'vs/editor/browser/editorExtensions'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; import { HoverParticipantRegistry } from 'vs/editor/contrib/hover/browser/hoverTypes'; import { inlineSuggestCommitId } from 'vs/editor/contrib/inlineCompletions/browser/consts'; @@ -13,7 +13,7 @@ import { InlineCompletionsHoverParticipant } from 'vs/editor/contrib/inlineCompl import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry'; -registerEditorContribution(GhostTextController.ID, GhostTextController); +registerEditorContribution(GhostTextController.ID, GhostTextController, EditorContributionInstantiation.Eager); registerEditorAction(TriggerInlineSuggestionAction); registerEditorAction(ShowNextInlineSuggestionAction); registerEditorAction(ShowPreviousInlineSuggestionAction); diff --git a/src/vs/editor/standalone/browser/quickInput/standaloneQuickInputService.ts b/src/vs/editor/standalone/browser/quickInput/standaloneQuickInputService.ts index 2c20b872287cf..2e5af6691b2d3 100644 --- a/src/vs/editor/standalone/browser/quickInput/standaloneQuickInputService.ts +++ b/src/vs/editor/standalone/browser/quickInput/standaloneQuickInputService.ts @@ -5,7 +5,7 @@ import 'vs/css!./standaloneQuickInput'; import { ICodeEditor, IOverlayWidget, IOverlayWidgetPosition, OverlayWidgetPositionPreference } from 'vs/editor/browser/editorBrowser'; -import { registerEditorContribution } from 'vs/editor/browser/editorExtensions'; +import { EditorContributionInstantiation, registerEditorContribution } from 'vs/editor/browser/editorExtensions'; import { IEditorContribution } from 'vs/editor/common/editorCommon'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { IQuickInputService, IQuickInputButton, IQuickPickItem, IQuickPick, IInputBox, IQuickNavigateConfiguration, IPickOptions, QuickPickInput, IInputOptions } from 'vs/platform/quickinput/common/quickInput'; @@ -184,4 +184,4 @@ export class QuickInputEditorWidget implements IOverlayWidget { } } -registerEditorContribution(QuickInputEditorContribution.ID, QuickInputEditorContribution); +registerEditorContribution(QuickInputEditorContribution.ID, QuickInputEditorContribution, EditorContributionInstantiation.Eager); diff --git a/src/vs/workbench/contrib/debug/browser/debug.contribution.ts b/src/vs/workbench/contrib/debug/browser/debug.contribution.ts index 731a1839b27c5..4b8c039b76cab 100644 --- a/src/vs/workbench/contrib/debug/browser/debug.contribution.ts +++ b/src/vs/workbench/contrib/debug/browser/debug.contribution.ts @@ -9,7 +9,7 @@ import { isMacintosh, isWeb } from 'vs/base/common/platform'; import { URI } from 'vs/base/common/uri'; import 'vs/css!./media/debug.contribution'; import 'vs/css!./media/debugHover'; -import { registerEditorContribution } from 'vs/editor/browser/editorExtensions'; +import { EditorContributionInstantiation, registerEditorContribution } from 'vs/editor/browser/editorExtensions'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; import * as nls from 'vs/nls'; import { ICommandActionTitle, Icon } from 'vs/platform/action/common/action'; @@ -90,9 +90,9 @@ Registry.as(QuickAccessExtensions.Quickaccess).registerQui helpEntries: [{ description: nls.localize('tasksQuickAccessHelp', "Show All Debug Consoles"), commandId: SELECT_DEBUG_CONSOLE_ID }] }); -registerEditorContribution('editor.contrib.callStack', LazyCallStackEditorContribution); -registerEditorContribution(BREAKPOINT_EDITOR_CONTRIBUTION_ID, LazyBreakpointEditorContribution); -registerEditorContribution(EDITOR_CONTRIBUTION_ID, LazyDebugEditorContribution); +registerEditorContribution('editor.contrib.callStack', LazyCallStackEditorContribution, EditorContributionInstantiation.Eager); +registerEditorContribution(BREAKPOINT_EDITOR_CONTRIBUTION_ID, LazyBreakpointEditorContribution, EditorContributionInstantiation.Eager); +registerEditorContribution(EDITOR_CONTRIBUTION_ID, LazyDebugEditorContribution, EditorContributionInstantiation.Eager); const registerDebugCommandPaletteItem = (id: string, title: ICommandActionTitle, when?: ContextKeyExpression, precondition?: ContextKeyExpression) => { MenuRegistry.appendMenuItem(MenuId.CommandPalette, {