Merge branch 'master' into joh/bulkEditPreview

This commit is contained in:
Johannes Rieken
2020-01-08 09:30:30 +01:00
83 changed files with 2413 additions and 1348 deletions

View File

@@ -47,12 +47,6 @@ type ConfigurationInspect<T> = {
workspaceFolderLanguageValue?: T;
};
function isTextDocument(thing: any): thing is vscode.TextDocument {
return thing
&& thing.uri instanceof URI
&& (!thing.languageId || typeof thing.languageId === 'string');
}
function isWorkspaceFolder(thing: any): thing is vscode.WorkspaceFolder {
return thing
&& thing.uri instanceof URI
@@ -64,9 +58,9 @@ function isUri(thing: any): thing is vscode.Uri {
return thing instanceof URI;
}
function isResourceLanguage(thing: any): thing is { resource: URI, languageId: string } {
function isResourceLanguage(thing: any): thing is { uri: URI, languageId: string } {
return thing
&& thing.resource instanceof URI
&& thing.uri instanceof URI
&& (!thing.languageId || typeof thing.languageId === 'string');
}
@@ -77,11 +71,8 @@ function scopeToOverrides(scope: vscode.ConfigurationScope | undefined | null):
if (isWorkspaceFolder(scope)) {
return { resource: scope.uri };
}
if (isTextDocument(scope)) {
return { resource: scope.uri, overrideIdentifier: scope.languageId };
}
if (isResourceLanguage(scope)) {
return scope;
return { resource: scope.uri, overrideIdentifier: scope.languageId };
}
return undefined;
}

View File

@@ -662,7 +662,7 @@ export abstract class AbstractExtHostExtensionService implements ExtHostExtensio
value: {
authority,
options,
tunnelInformation: { environmentTunnels: result.environmentTunnels }
tunnelInformation: { environmentTunnels: result.environmentTunnels, hideCandidatePorts: result.hideCandidatePorts }
}
};
} catch (err) {

View File

@@ -5,6 +5,7 @@
import * as nls from 'vs/nls';
import * as vscode from 'vscode';
import * as env from 'vs/base/common/platform';
import { DebugAdapterExecutable } from 'vs/workbench/api/common/extHostTypes';
import { ExecutableDebugAdapter, SocketDebugAdapter } from 'vs/workbench/contrib/debug/node/debugAdapter';
import { AbstractDebugAdapter } from 'vs/workbench/contrib/debug/common/abstractDebugAdapter';
@@ -23,7 +24,6 @@ import { SignService } from 'vs/platform/sign/node/signService';
import { hasChildProcesses, prepareCommand, runInExternalTerminal } from 'vs/workbench/contrib/debug/node/terminals';
import { IDisposable } from 'vs/base/common/lifecycle';
import { AbstractVariableResolverService } from 'vs/workbench/services/configurationResolver/common/variableResolver';
import { IProcessEnvironment } from 'vs/base/common/platform';
export class ExtHostDebugService extends ExtHostDebugServiceBase {
@@ -87,7 +87,22 @@ export class ExtHostDebugService extends ExtHostDebugServiceBase {
}
const configProvider = await this._configurationService.getConfigProvider();
const shell = this._terminalService.getDefaultShell(true, configProvider);
const terminalConfig = configProvider.getConfiguration('terminal');
let shell;
const automationShellConfig = terminalConfig.integrated.automationShell;
if (automationShellConfig) {
if (env.isWindows) {
shell = automationShellConfig.windows;
} else if (env.isLinux) {
shell = automationShellConfig.linux;
} else if (env.isMacintosh) {
shell = automationShellConfig.osx;
}
}
if (!shell) {
shell = this._terminalService.getDefaultShell(true, configProvider);
}
if (needNewTerminal || !this._integratedTerminalInstance) {
@@ -108,7 +123,7 @@ export class ExtHostDebugService extends ExtHostDebugServiceBase {
terminal.show();
const shellProcessId = await this._integratedTerminalInstance.processId;
const command = prepareCommand(args, shell, configProvider);
const command = prepareCommand(args, shell);
terminal.sendText(command, true);
return shellProcessId;
@@ -121,7 +136,7 @@ export class ExtHostDebugService extends ExtHostDebugServiceBase {
}
protected createVariableResolver(folders: vscode.WorkspaceFolder[], editorService: ExtHostDocumentsAndEditors, configurationService: ExtHostConfigProvider): AbstractVariableResolverService {
return new ExtHostVariableResolverService(folders, editorService, configurationService, process.env as IProcessEnvironment);
return new ExtHostVariableResolverService(folders, editorService, configurationService, process.env as env.IProcessEnvironment);
}
}