66import * as nls from 'vs/nls' ;
77import * as pfs from 'vs/base/node/pfs' ;
88import * as platform from 'vs/base/common/platform' ;
9- import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey' ;
9+ import { IContextKeyService , IContextKey } from 'vs/platform/contextkey/common/contextkey' ;
1010import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation' ;
1111import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle' ;
1212import { IPanelService } from 'vs/workbench/services/panel/common/panelService' ;
@@ -26,6 +26,7 @@ import { IDialogService } from 'vs/platform/dialogs/common/dialogs';
2626import { INotificationService } from 'vs/platform/notification/common/notification' ;
2727import { ipcRenderer as ipc } from 'electron' ;
2828import { IOpenFileRequest } from 'vs/platform/windows/common/windows' ;
29+ import { TerminalInstance } from 'vs/workbench/parts/terminal/electron-browser/terminalInstance' ;
2930
3031export class TerminalService extends AbstractTerminalService implements ITerminalService {
3132 private _configHelper : TerminalConfigHelper ;
@@ -67,7 +68,7 @@ export class TerminalService extends AbstractTerminalService implements ITermina
6768 } ) ;
6869 }
6970
70- public createInstance ( shell : IShellLaunchConfig = { } , wasNewTerminalAction ?: boolean ) : ITerminalInstance {
71+ public createTerminal ( shell : IShellLaunchConfig = { } , wasNewTerminalAction ?: boolean ) : ITerminalInstance {
7172 const terminalTab = this . _instantiationService . createInstance ( TerminalTab ,
7273 this . _terminalFocusContextKey ,
7374 this . _configHelper ,
@@ -88,6 +89,10 @@ export class TerminalService extends AbstractTerminalService implements ITermina
8889 return instance ;
8990 }
9091
92+ public createInstance ( terminalFocusContextKey : IContextKey < boolean > , configHelper : ITerminalConfigHelper , container : HTMLElement , shellLaunchConfig : IShellLaunchConfig , doCreateProcess : boolean ) : ITerminalInstance {
93+ return this . _instantiationService . createInstance ( TerminalInstance , terminalFocusContextKey , configHelper , undefined , shellLaunchConfig , true ) ;
94+ }
95+
9196 public focusFindWidget ( ) : TPromise < void > {
9297 return this . showPanel ( false ) . then ( ( ) => {
9398 let panel = this . _panelService . getActivePanel ( ) as TerminalPanel ;
@@ -154,7 +159,7 @@ export class TerminalService extends AbstractTerminalService implements ITermina
154159 return TPromise . as ( null ) ;
155160 }
156161 // Launch a new instance with the newly selected shell
157- const instance = this . createInstance ( {
162+ const instance = this . createTerminal ( {
158163 executable : shell ,
159164 args : this . _configHelper . config . shellArgs . windows
160165 } ) ;
@@ -234,7 +239,7 @@ export class TerminalService extends AbstractTerminalService implements ITermina
234239
235240 public getActiveOrCreateInstance ( wasNewTerminalAction ?: boolean ) : ITerminalInstance {
236241 const activeInstance = this . getActiveInstance ( ) ;
237- return activeInstance ? activeInstance : this . createInstance ( undefined , wasNewTerminalAction ) ;
242+ return activeInstance ? activeInstance : this . createTerminal ( undefined , wasNewTerminalAction ) ;
238243 }
239244
240245 protected _showTerminalCloseConfirmation ( ) : TPromise < boolean > {
0 commit comments