src/vs/workbench/contrib/terminal/browser/terminalService.ts/TerminalService/_initInstanceListeners
class TerminalService:	protected _initInstanceListeners(instance: ITerminalInstance): void {
		instance.addDisposable(instance.onTitleChanged(this._onInstanceTitleChanged.fire, this._onInstanceTitleChanged));
		instance.addDisposable(instance.onIconChanged(this._onInstanceIconChanged.fire, this._onInstanceIconChanged));
		instance.addDisposable(instance.onIconChanged(this._onInstanceColorChanged.fire, this._onInstanceColorChanged));
		instance.addDisposable(instance.onProcessIdReady(this._onInstanceProcessIdReady.fire, this._onInstanceProcessIdReady));
		instance.addDisposable(instance.statusList.onDidChangePrimaryStatus(() => this._onInstancePrimaryStatusChanged.fire(instance)));
		instance.addDisposable(instance.onLinksReady(this._onInstanceLinksReady.fire, this._onInstanceLinksReady));
		instance.addDisposable(instance.onDimensionsChanged(() => {
			this._onInstanceDimensionsChanged.fire(instance);
			if (this.configHelper.config.enablePersistentSessions && this.isProcessSupportRegistered) {
				this._saveState();
			}
		}));
		instance.addDisposable(instance.onMaximumDimensionsChanged(() => this._onInstanceMaximumDimensionsChanged.fire(instance)));
		instance.addDisposable(instance.onFocus(this._onDidChangeActiveInstance.fire, this._onDidChangeActiveInstance));
		instance.addDisposable(instance.onRequestAddInstanceToGroup(e => {
			const instanceId = this._getInstanceIdFromUri(e.uri);
			if (instanceId === undefined) {
				return;
			}

			// View terminals
			let sourceInstance = this._terminalGroupService.instances.find(e => e.instanceId === instanceId);
			if (sourceInstance) {
				this._terminalGroupService.moveInstance(sourceInstance, instance, e.side);
				return;
			}

			// Terminal editors
			sourceInstance = this._terminalEditorService.instances.find(e => e.instanceId === instanceId);
			if (sourceInstance) {
				this.moveToTerminalView(sourceInstance, instance, e.side);
			}
		}));
	}