diff --git a/src/vs/editor/standalone/browser/standaloneCodeEditor.ts b/src/vs/editor/standalone/browser/standaloneCodeEditor.ts index 89f633ea757e3f48f2b12f40291a6292895ed99a..bf61c89c89977f8fe3a5a1c27b516af873dfe892 100644 --- a/src/vs/editor/standalone/browser/standaloneCodeEditor.ts +++ b/src/vs/editor/standalone/browser/standaloneCodeEditor.ts @@ -23,7 +23,7 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur import { ContextKeyExpr, IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IContextViewService, IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { ContextViewService } from 'vs/platform/contextview/browser/contextViewService'; -import { IInstantiationService, optional } from 'vs/platform/instantiation/common/instantiation'; +import { IInstantiationService, optional, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { INotificationService } from 'vs/platform/notification/common/notification'; import { IThemeService } from 'vs/platform/theme/common/themeService'; @@ -75,7 +75,7 @@ export interface IActionDescriptor { * Method that will be executed when the action is triggered. * @param editor The editor instance is passed in as a convenience */ - run(editor: ICodeEditor): void | Promise; + run(editor: ICodeEditor, ...args: any[]): void | Promise; } /** @@ -276,8 +276,8 @@ export class StandaloneCodeEditor extends CodeEditorWidget implements IStandalon ); const contextMenuGroupId = _descriptor.contextMenuGroupId || null; const contextMenuOrder = _descriptor.contextMenuOrder || 0; - const run = (): Promise => { - return Promise.resolve(_descriptor.run(this)); + const run = (accessor?: ServicesAccessor, ...args: any[]): Promise => { + return Promise.resolve(_descriptor.run(this, ...args)); }; diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index 766b1d38f718cf764f99d52c1afea0ca0b2679b2..ad9ede1dca1d0740286770540d8a49790c94c96d 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -1046,7 +1046,7 @@ declare namespace monaco.editor { * Method that will be executed when the action is triggered. * @param editor The editor instance is passed in as a convenience */ - run(editor: ICodeEditor): void | Promise; + run(editor: ICodeEditor, ...args: any[]): void | Promise; } /**