提交 e3df1e23 编写于 作者: A Andre Weinand

fix naming

上级 cc937a36
......@@ -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 {
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];
}
} else {
destination[key] = source[key];
}
}
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册