mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-20 00:28:52 +01:00
This commit is contained in:
@@ -242,7 +242,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
||||
// namespace: commands
|
||||
const commands: typeof vscode.commands = {
|
||||
registerCommand(id: string, command: <T>(...args: any[]) => T | Thenable<T>, thisArgs?: any): vscode.Disposable {
|
||||
return extHostCommands.registerCommand(true, id, command, thisArgs);
|
||||
return extHostCommands.registerCommand(true, id, command, thisArgs, undefined, extension);
|
||||
},
|
||||
registerTextEditorCommand(id: string, callback: (textEditor: vscode.TextEditor, edit: vscode.TextEditorEdit, ...args: any[]) => void, thisArg?: any): vscode.Disposable {
|
||||
return extHostCommands.registerCommand(true, id, (...args: any[]): any => {
|
||||
@@ -262,7 +262,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
||||
}, (err) => {
|
||||
extHostLogService.warn('An error occurred while running command ' + id, err);
|
||||
});
|
||||
});
|
||||
}, undefined, undefined, extension);
|
||||
},
|
||||
registerDiffInformationCommand: (id: string, callback: (diff: vscode.LineChange[], ...args: any[]) => any, thisArg?: any): vscode.Disposable => {
|
||||
checkProposedApiEnabled(extension);
|
||||
@@ -275,7 +275,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
||||
|
||||
const diff = await extHostEditors.getDiffInformation(activeTextEditor.id);
|
||||
callback.apply(thisArg, [diff, ...args]);
|
||||
});
|
||||
}, undefined, undefined, extension);
|
||||
},
|
||||
executeCommand<T>(id: string, ...args: any[]): Thenable<T> {
|
||||
return extHostCommands.executeCommand<T>(id, ...args);
|
||||
|
||||
Reference in New Issue
Block a user