mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-04 17:23:45 -05:00
Merge from vscode 709a07d51919d3266ca71699c6ddfb2d3547c0e1 (#6575)
This commit is contained in:
@@ -880,6 +880,7 @@ export interface ExtHostExtensionServiceShape {
|
||||
$startExtensionHost(enabledExtensionIds: ExtensionIdentifier[]): Promise<void>;
|
||||
$activateByEvent(activationEvent: string): Promise<void>;
|
||||
$activate(extensionId: ExtensionIdentifier, activationEvent: string): Promise<boolean>;
|
||||
$setRemoteEnvironment(env: { [key: string]: string | null }): Promise<void>;
|
||||
|
||||
$deltaExtensions(toAdd: IExtensionDescription[], toRemove: ExtensionIdentifier[]): Promise<void>;
|
||||
|
||||
|
||||
@@ -128,7 +128,9 @@ export class ExtHostCommands implements ExtHostCommandsShape {
|
||||
if (this._commands.has(id)) {
|
||||
// we stay inside the extension host and support
|
||||
// to pass any kind of parameters around
|
||||
return this._executeContributedCommand<T>(id, args);
|
||||
const res = this._executeContributedCommand<T>(id, args);
|
||||
this._onDidExecuteCommand.fire({ command: id, arguments: args });
|
||||
return res;
|
||||
|
||||
} else {
|
||||
// automagically convert some argument types
|
||||
@@ -170,7 +172,6 @@ export class ExtHostCommands implements ExtHostCommandsShape {
|
||||
|
||||
try {
|
||||
const result = callback.apply(thisArg, args);
|
||||
this._onDidExecuteCommand.fire({ command: id, arguments: args });
|
||||
return Promise.resolve(result);
|
||||
} catch (err) {
|
||||
this._logService.error(err, id);
|
||||
|
||||
@@ -263,8 +263,8 @@ export class ExtHostConfigProvider {
|
||||
const defaultConfiguration = ExtHostConfigProvider.parseConfigurationModel(data.defaults);
|
||||
const userConfiguration = ExtHostConfigProvider.parseConfigurationModel(data.user);
|
||||
const workspaceConfiguration = ExtHostConfigProvider.parseConfigurationModel(data.workspace);
|
||||
const folders: ResourceMap<ConfigurationModel> = Object.keys(data.folders).reduce((result, key) => {
|
||||
result.set(URI.parse(key), ExtHostConfigProvider.parseConfigurationModel(data.folders[key]));
|
||||
const folders: ResourceMap<ConfigurationModel> = data.folders.reduce((result, value) => {
|
||||
result.set(URI.revive(value[0]), ExtHostConfigProvider.parseConfigurationModel(value[1]));
|
||||
return result;
|
||||
}, new ResourceMap<ConfigurationModel>());
|
||||
return new Configuration(defaultConfiguration, userConfiguration, new ConfigurationModel(), workspaceConfiguration, folders, new ConfigurationModel(), new ResourceMap<ConfigurationModel>(), false);
|
||||
|
||||
@@ -767,6 +767,20 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape {
|
||||
return buff;
|
||||
}
|
||||
|
||||
public async $setRemoteEnvironment(env: { [key: string]: string | null }): Promise<void> {
|
||||
if (!this._initData.remote.isRemote) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (const key in env) {
|
||||
const value = env[key];
|
||||
if (value === null) {
|
||||
delete process.env[key];
|
||||
} else {
|
||||
process.env[key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function loadCommonJSModule<T>(logService: ILogService, modulePath: string, activationTimesBuilder: ExtensionActivationTimesBuilder): Promise<T> {
|
||||
|
||||
@@ -743,12 +743,16 @@ export class ExtHostTask implements ExtHostTaskShape {
|
||||
throw new Error('Unexpected: Task cannot be resolved.');
|
||||
}
|
||||
|
||||
if (resolvedTask.definition !== task.definition) {
|
||||
throw new Error('Unexpected: The resolved task definition must be the same object as the original task definition. The task definition cannot be changed.');
|
||||
}
|
||||
|
||||
if (CustomExecutionDTO.is(resolvedTaskDTO.execution)) {
|
||||
await this.addCustomExecution(taskDTO, <vscode.Task2>task);
|
||||
await this.addCustomExecution(resolvedTaskDTO, <vscode.Task2>resolvedTask);
|
||||
}
|
||||
|
||||
if (CustomExecution2DTO.is(resolvedTaskDTO.execution)) {
|
||||
await this.addCustomExecution2(taskDTO, <vscode.Task2>task);
|
||||
await this.addCustomExecution2(resolvedTaskDTO, <vscode.Task2>resolvedTask);
|
||||
}
|
||||
|
||||
return resolvedTaskDTO;*/
|
||||
|
||||
@@ -371,7 +371,8 @@ export class ExtHostTerminalService implements ExtHostTerminalServiceShape {
|
||||
process.env.hasOwnProperty('PROCESSOR_ARCHITEW6432'),
|
||||
process.env.windir,
|
||||
this._lastActiveWorkspace,
|
||||
this._variableResolver
|
||||
this._variableResolver,
|
||||
this._logService
|
||||
);
|
||||
}
|
||||
|
||||
@@ -383,7 +384,7 @@ export class ExtHostTerminalService implements ExtHostTerminalServiceShape {
|
||||
return this._apiInspectConfigToPlain<string | string[]>(setting);
|
||||
};
|
||||
|
||||
return terminalEnvironment.getDefaultShellArgs(fetchSetting, this._isWorkspaceShellAllowed, this._lastActiveWorkspace, this._variableResolver);
|
||||
return terminalEnvironment.getDefaultShellArgs(fetchSetting, this._isWorkspaceShellAllowed, this._lastActiveWorkspace, this._variableResolver, this._logService);
|
||||
}
|
||||
|
||||
public async resolveTerminalRenderer(id: number): Promise<vscode.TerminalRenderer> {
|
||||
|
||||
Reference in New Issue
Block a user