@@ -25,6 +25,7 @@ import { toResource } from 'vs/workbench/common/editor';
2525import { IWorkbenchEditorService , IResourceInputType } from 'vs/workbench/services/editor/common/editorService' ;
2626import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService' ;
2727import { IMessageService } from 'vs/platform/message/common/message' ;
28+ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry' ;
2829import { IWorkspaceConfigurationService } from 'vs/workbench/services/configuration/common/configuration' ;
2930import { IWindowsService , IWindowService , IWindowSettings , IWindowConfiguration , IPath , IOpenFileRequest } from 'vs/platform/windows/common/windows' ;
3031import { IContextMenuService } from 'vs/platform/contextview/browser/contextView' ;
@@ -84,7 +85,8 @@ export class ElectronWindow extends Themable {
8485 @IViewletService private viewletService : IViewletService ,
8586 @IContextMenuService private contextMenuService : IContextMenuService ,
8687 @IKeybindingService private keybindingService : IKeybindingService ,
87- @IEnvironmentService private environmentService : IEnvironmentService
88+ @IEnvironmentService private environmentService : IEnvironmentService ,
89+ @ITelemetryService private telemetryService : ITelemetryService
8890 ) {
8991 super ( themeService ) ;
9092
@@ -206,7 +208,11 @@ export class ElectronWindow extends Themable {
206208
207209 // Support runAction event
208210 ipc . on ( 'vscode:runAction' , ( event , actionId : string ) => {
209- this . commandService . executeCommand ( actionId , { from : 'menu' } ) . done ( undefined , err => this . messageService . show ( Severity . Error , err ) ) ;
211+ this . commandService . executeCommand ( actionId , { from : 'menu' } ) . done ( _ => {
212+ this . telemetryService . publicLog ( 'commandExecuted' , { id : actionId , from : 'menu' } ) ;
213+ } , err => {
214+ this . messageService . show ( Severity . Error , err ) ;
215+ } ) ;
210216 } ) ;
211217
212218 // Support resolve keybindings event
@@ -477,4 +483,4 @@ export class ElectronWindow extends Themable {
477483 public focus ( ) : TPromise < void > {
478484 return this . windowService . focusWindow ( ) ;
479485 }
480- }
486+ }
0 commit comments