44'use strict' ;
55
66import { inject , injectable } from 'inversify' ;
7- import { Disposable , Event , EventEmitter , Uri } from 'vscode' ;
7+ import { Disposable , EventEmitter , Uri } from 'vscode' ;
88
99import { ICommandManager , IDocumentManager } from '../../common/application/types' ;
1010import { Commands } from '../../common/constants' ;
1111import '../../common/extensions' ;
12- import { IFileSystem } from '../../common/platform/types' ;
1312import { IDisposableRegistry , IConfigurationService , Resource } from '../../common/types' ;
1413import { noop } from '../../common/utils/misc' ;
1514import { IInterpreterService } from '../../interpreter/contracts' ;
@@ -30,15 +29,10 @@ export class CodeExecutionManager implements ICodeExecutionManager {
3029 @inject ( ICommandManager ) private commandManager : ICommandManager ,
3130 @inject ( IDocumentManager ) private documentManager : IDocumentManager ,
3231 @inject ( IDisposableRegistry ) private disposableRegistry : Disposable [ ] ,
33- @inject ( IFileSystem ) private fileSystem : IFileSystem ,
3432 @inject ( IConfigurationService ) private readonly configSettings : IConfigurationService ,
3533 @inject ( IServiceContainer ) private serviceContainer : IServiceContainer ,
3634 ) { }
3735
38- public get onExecutedCode ( ) : Event < string > {
39- return this . eventEmitter . event ;
40- }
41-
4236 public registerCommands ( ) {
4337 [ Commands . Exec_In_Terminal , Commands . Exec_In_Terminal_Icon , Commands . Exec_In_Separate_Terminal ] . forEach (
4438 ( cmd ) => {
@@ -127,15 +121,6 @@ export class CodeExecutionManager implements ICodeExecutionManager {
127121 fileToExecute = fileAfterSave ;
128122 }
129123
130- try {
131- const contents = await this . fileSystem . readFile ( fileToExecute . fsPath ) ;
132- this . eventEmitter . fire ( contents ) ;
133- } catch {
134- // Ignore any errors that occur for firing this event. It's only used
135- // for telemetry
136- noop ( ) ;
137- }
138-
139124 const executionService = this . serviceContainer . get < ICodeExecutionService > ( ICodeExecutionService , 'standard' ) ;
140125 await executionService . executeFile ( fileToExecute , options ) ;
141126 }
0 commit comments