mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 02:28:34 +01:00
Remove Terminal.onData proposed API
This was to be used by tasks as an extenion which ended up not happening.
This commit is contained in:
@@ -20,8 +20,6 @@ export class ExtHostTerminal implements vscode.Terminal {
|
||||
private _pidPromise: TPromise<number>;
|
||||
private _pidPromiseComplete: TValueCallback<number>;
|
||||
|
||||
private _onDataCallback: (data: string) => any;
|
||||
|
||||
constructor(
|
||||
proxy: MainThreadTerminalServiceShape,
|
||||
name?: string,
|
||||
@@ -69,11 +67,6 @@ export class ExtHostTerminal implements vscode.Terminal {
|
||||
this._queueApiRequest(this._proxy.$hide, []);
|
||||
}
|
||||
|
||||
public onData(callback: (data: string) => any): void {
|
||||
this._onDataCallback = callback;
|
||||
this._queueApiRequest(this._proxy.$registerOnData, []);
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
if (!this._disposed) {
|
||||
this._disposed = true;
|
||||
@@ -86,10 +79,6 @@ export class ExtHostTerminal implements vscode.Terminal {
|
||||
this._pidPromiseComplete = null;
|
||||
}
|
||||
|
||||
public _onData(data: string): void {
|
||||
this._onDataCallback(data);
|
||||
}
|
||||
|
||||
private _queueApiRequest(callback: (...args: any[]) => void, args: any[]) {
|
||||
let request: ApiRequest = new ApiRequest(callback, args);
|
||||
if (!this._id) {
|
||||
@@ -149,11 +138,6 @@ export class ExtHostTerminalService implements ExtHostTerminalServiceShape {
|
||||
terminal._setProcessId(processId);
|
||||
}
|
||||
|
||||
public $acceptTerminalData(id: number, data: string): void {
|
||||
let terminal = this._getTerminalById(id);
|
||||
terminal._onData(data);
|
||||
}
|
||||
|
||||
private _getTerminalById(id: number): ExtHostTerminal {
|
||||
let index = this._getTerminalIndexById(id);
|
||||
return index !== null ? this._terminals[index] : null;
|
||||
|
||||
Reference in New Issue
Block a user