fix naming

This commit is contained in:
Andre Weinand
2020-06-11 22:59:16 +02:00
parent cc937a368c
commit e3df1e23cc
2 changed files with 23 additions and 21 deletions
@@ -105,25 +105,25 @@ export class ConfigurationManager implements IConfigurationManager {
}
createDebugAdapter(session: IDebugSession): IDebugAdapter | undefined {
let dap = this.debugAdapterFactories.get(session.configuration.type);
if (dap) {
return dap.createDebugAdapter(session);
let factory = this.debugAdapterFactories.get(session.configuration.type);
if (factory) {
return factory.createDebugAdapter(session);
}
return undefined;
}
substituteVariables(debugType: string, folder: IWorkspaceFolder | undefined, config: IConfig): Promise<IConfig> {
let dap = this.debugAdapterFactories.get(debugType);
if (dap) {
return dap.substituteVariables(folder, config);
let factory = this.debugAdapterFactories.get(debugType);
if (factory) {
return factory.substituteVariables(folder, config);
}
return Promise.resolve(config);
}
runInTerminal(debugType: string, args: DebugProtocol.RunInTerminalRequestArguments): Promise<number | undefined> {
let tl = this.debugAdapterFactories.get(debugType);
if (tl) {
return tl.runInTerminal(args);
let factory = this.debugAdapterFactories.get(debugType);
if (factory) {
return factory.runInTerminal(args);
}
return Promise.resolve(void 0);
}
@@ -58,19 +58,21 @@ export class Debugger implements IDebugger {
if (isObject(source)) {
Object.keys(source).forEach(key => {
if (isObject(destination[key]) && isObject(source[key])) {
mixin(destination[key], source[key], overwrite, level + 1);
} else {
if (key in destination) {
if (overwrite) {
if (level === 0 && key === 'type') {
// don't merge the 'type' property
} else {
destination[key] = source[key];
}
}
if (key !== '__proto__') {
if (isObject(destination[key]) && isObject(source[key])) {
mixin(destination[key], source[key], overwrite, level + 1);
} else {
destination[key] = source[key];
if (key in destination) {
if (overwrite) {
if (level === 0 && key === 'type') {
// don't merge the 'type' property
} else {
destination[key] = source[key];
}
}
} else {
destination[key] = source[key];
}
}
}
});