|
3 | 3 | * Licensed under the MIT License. See License.txt in the project root for license information. |
4 | 4 | *--------------------------------------------------------------------------------------------*/ |
5 | 5 |
|
6 | | -/* eslint-disable local/code-no-native-private */ |
7 | | - |
8 | 6 | import { InstantiationType, registerSingleton } from 'vs/platform/instantiation/common/extensions'; |
9 | 7 | import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; |
10 | 8 | import { Emitter, Event } from 'vs/base/common/event'; |
@@ -74,44 +72,44 @@ class EmbedderTerminalService implements IEmbedderTerminalService { |
74 | 72 |
|
75 | 73 |
|
76 | 74 | class EmbedderTerminalProcess extends Disposable implements ITerminalChildProcess { |
77 | | - readonly #pty: IEmbedderTerminalPty; |
| 75 | + private readonly _pty: IEmbedderTerminalPty; |
78 | 76 |
|
79 | 77 | readonly shouldPersist = false; |
80 | 78 |
|
81 | 79 | readonly onProcessData: Event<IProcessDataEvent | string>; |
82 | | - readonly #onProcessReady = this._register(new Emitter<IProcessReadyEvent>()); |
83 | | - readonly onProcessReady = this.#onProcessReady.event; |
84 | | - readonly #onDidChangeProperty = this._register(new Emitter<IProcessProperty<any>>()); |
85 | | - readonly onDidChangeProperty = this.#onDidChangeProperty.event; |
86 | | - readonly #onProcessExit = this._register(new Emitter<number | undefined>()); |
87 | | - readonly onProcessExit = this.#onProcessExit.event; |
| 80 | + private readonly _onProcessReady = this._register(new Emitter<IProcessReadyEvent>()); |
| 81 | + readonly onProcessReady = this._onProcessReady.event; |
| 82 | + private readonly _onDidChangeProperty = this._register(new Emitter<IProcessProperty<any>>()); |
| 83 | + readonly onDidChangeProperty = this._onDidChangeProperty.event; |
| 84 | + private readonly _onProcessExit = this._register(new Emitter<number | undefined>()); |
| 85 | + readonly onProcessExit = this._onProcessExit.event; |
88 | 86 |
|
89 | 87 | constructor( |
90 | 88 | readonly id: number, |
91 | 89 | pty: IEmbedderTerminalPty |
92 | 90 | ) { |
93 | 91 | super(); |
94 | 92 |
|
95 | | - this.#pty = pty; |
96 | | - this.onProcessData = this.#pty.onDidWrite; |
97 | | - if (this.#pty.onDidClose) { |
98 | | - this._register(this.#pty.onDidClose(e => this.#onProcessExit.fire(e || undefined))); |
| 93 | + this._pty = pty; |
| 94 | + this.onProcessData = this._pty.onDidWrite; |
| 95 | + if (this._pty.onDidClose) { |
| 96 | + this._register(this._pty.onDidClose(e => this._onProcessExit.fire(e || undefined))); |
99 | 97 | } |
100 | | - if (this.#pty.onDidChangeName) { |
101 | | - this._register(this.#pty.onDidChangeName(e => this.#onDidChangeProperty.fire({ |
| 98 | + if (this._pty.onDidChangeName) { |
| 99 | + this._register(this._pty.onDidChangeName(e => this._onDidChangeProperty.fire({ |
102 | 100 | type: ProcessPropertyType.Title, |
103 | 101 | value: e |
104 | 102 | }))); |
105 | 103 | } |
106 | 104 | } |
107 | 105 |
|
108 | 106 | async start(): Promise<ITerminalLaunchError | undefined> { |
109 | | - this.#onProcessReady.fire({ pid: -1, cwd: '', windowsPty: undefined }); |
110 | | - this.#pty.open(); |
| 107 | + this._onProcessReady.fire({ pid: -1, cwd: '', windowsPty: undefined }); |
| 108 | + this._pty.open(); |
111 | 109 | return undefined; |
112 | 110 | } |
113 | 111 | shutdown(): void { |
114 | | - this.#pty.close(); |
| 112 | + this._pty.close(); |
115 | 113 | } |
116 | 114 |
|
117 | 115 | // TODO: A lot of these aren't useful for some implementations of ITerminalChildProcess, should |
|
0 commit comments