@@ -142,7 +142,7 @@ export class AbstractKeybindingService {
142142 throw new Error ( 'Not implemented' ) ;
143143 }
144144
145- public executeCommand ( commandId : string , args :any ) : void {
145+ public executeCommand ( commandId : string , args :any ) : TPromise < any > {
146146 throw new Error ( 'Not implemented' ) ;
147147 }
148148}
@@ -300,7 +300,7 @@ export class KeybindingService extends AbstractKeybindingService implements IKey
300300 delete this . _contexts [ String ( contextId ) ] ;
301301 }
302302
303- public executeCommand ( commandId : string , args :any = { } ) : any {
303+ public executeCommand ( commandId : string , args :any = { } ) : TPromise < any > {
304304 if ( ! args . context ) {
305305 var contextId = this . _findContextAttr ( < HTMLElement > document . activeElement ) ;
306306 var context = this . getContext ( contextId ) ;
@@ -309,9 +309,7 @@ export class KeybindingService extends AbstractKeybindingService implements IKey
309309 args . context = contextValue ;
310310 }
311311
312- return this . _invokeHandler ( commandId , args ) . done ( undefined , err => {
313- this . _messageService . show ( Severity . Warning , err ) ;
314- } ) ;
312+ return this . _invokeHandler ( commandId , args ) ;
315313 }
316314}
317315
@@ -356,8 +354,8 @@ class ScopedKeybindingService extends AbstractKeybindingService {
356354 this . _parent . disposeContext ( contextId ) ;
357355 }
358356
359- public executeCommand ( commandId : string , args :any ) : void {
360- this . _parent . executeCommand ( commandId , args ) ;
357+ public executeCommand ( commandId : string , args :any ) : TPromise < any > {
358+ return this . _parent . executeCommand ( commandId , args ) ;
361359 }
362360}
363361
0 commit comments