Add active editor to editor tabs and use in variable resolver (#123450)

This commit is contained in:
Alex Ross
2021-05-11 01:47:28 -07:00
committed by GitHub
parent 102b3b410e
commit f41b6e6d81
10 changed files with 68 additions and 27 deletions

View File

@@ -14,6 +14,7 @@ import { IShellAndArgsDto } from 'vs/workbench/api/common/extHost.protocol';
import { ExtHostConfigProvider, ExtHostConfiguration, IExtHostConfiguration } from 'vs/workbench/api/common/extHostConfiguration';
import { ExtHostVariableResolverService } from 'vs/workbench/api/common/extHostDebugService';
import { ExtHostDocumentsAndEditors, IExtHostDocumentsAndEditors } from 'vs/workbench/api/common/extHostDocumentsAndEditors';
import { IExtHostEditorTabs } from 'vs/workbench/api/common/extHostEditorTabs';
import { IExtHostRpcService } from 'vs/workbench/api/common/extHostRpcService';
import { BaseExtHostTerminalService, ExtHostTerminal } from 'vs/workbench/api/common/extHostTerminalService';
import { ExtHostWorkspace, IExtHostWorkspace } from 'vs/workbench/api/common/extHostWorkspace';
@@ -35,7 +36,8 @@ export class ExtHostTerminalService extends BaseExtHostTerminalService {
@IExtHostConfiguration private _extHostConfiguration: ExtHostConfiguration,
@IExtHostWorkspace private _extHostWorkspace: ExtHostWorkspace,
@IExtHostDocumentsAndEditors private _extHostDocumentsAndEditors: ExtHostDocumentsAndEditors,
@ILogService private _logService: ILogService
@ILogService private _logService: ILogService,
@IExtHostEditorTabs private _extHostEditorTabs: IExtHostEditorTabs
) {
super(true, extHostRpc);
@@ -113,7 +115,7 @@ export class ExtHostTerminalService extends BaseExtHostTerminalService {
private async _updateVariableResolver(): Promise<ExtHostVariableResolverService> {
const configProvider = await this._extHostConfiguration.getConfigProvider();
const workspaceFolders = await this._extHostWorkspace.getWorkspaceFolders2();
this._variableResolver = new ExtHostVariableResolverService(workspaceFolders || [], this._extHostDocumentsAndEditors, configProvider);
this._variableResolver = new ExtHostVariableResolverService(workspaceFolders || [], this._extHostDocumentsAndEditors, configProvider, this._extHostEditorTabs);
return this._variableResolver;
}