提交 f8afb1a1 编写于 作者: A André Weinand

rename IRawAdapter to IDebuggerContribution

上级 29c7fa8f
......@@ -412,7 +412,7 @@ export interface IRawEnvAdapter {
runtimeArgs?: string[];
}
export interface IRawAdapter extends IRawEnvAdapter {
export interface IDebuggerContribution extends IRawEnvAdapter {
adapterExecutableCommand?: string;
enableBreakpointsFor?: { languageIds: string[] };
configurationAttributes?: any;
......
......@@ -26,7 +26,7 @@ import { IFileService } from 'vs/platform/files/common/files';
import { IWorkspaceContextService, IWorkspaceFolder, WorkbenchState } from 'vs/platform/workspace/common/workspace';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { ICommandService } from 'vs/platform/commands/common/commands';
import { IDebugConfigurationProvider, IRawAdapter, ICompound, IDebugConfiguration, IConfig, IEnvConfig, IGlobalConfig, IConfigurationManager, ILaunch, IAdapterExecutable, IDebugAdapterProvider, IDebugAdapter } from 'vs/workbench/parts/debug/common/debug';
import { IDebugConfigurationProvider, IDebuggerContribution, ICompound, IDebugConfiguration, IConfig, IEnvConfig, IGlobalConfig, IConfigurationManager, ILaunch, IAdapterExecutable, IDebugAdapterProvider, IDebugAdapter } from 'vs/workbench/parts/debug/common/debug';
import { Debugger } from 'vs/workbench/parts/debug/node/debugger';
import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService';
import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen';
......@@ -36,7 +36,7 @@ import { launchSchemaId } from 'vs/workbench/services/configuration/common/confi
import { IPreferencesService } from 'vs/workbench/services/preferences/common/preferences';
// debuggers extension point
export const debuggersExtPoint = extensionsRegistry.ExtensionsRegistry.registerExtensionPoint<IRawAdapter[]>('debuggers', [], {
export const debuggersExtPoint = extensionsRegistry.ExtensionsRegistry.registerExtensionPoint<IDebuggerContribution[]>('debuggers', [], {
description: nls.localize('vscode.extension.contributes.debuggers', 'Contributes debug adapters.'),
type: 'array',
defaultSnippets: [{ body: [{ type: '', extensions: [] }] }],
......
......@@ -304,11 +304,11 @@ export class DebugAdapter extends StreamDebugAdapter {
}
}
private static extract(dbg: debug.IRawAdapter, extensionFolderPath: string) {
private static extract(dbg: debug.IDebuggerContribution, extensionFolderPath: string) {
if (!dbg) {
return undefined;
}
let x: debug.IRawAdapter = {};
let x: debug.IDebuggerContribution = {};
if (dbg.runtime) {
if (dbg.runtime.indexOf('./') === 0) { // TODO
......@@ -351,14 +351,14 @@ export class DebugAdapter extends StreamDebugAdapter {
static platformAdapterExecutable(extensionDescriptions: IExtensionDescription[], debugType: string): debug.IAdapterExecutable {
let result: debug.IRawAdapter = {};
let result: debug.IDebuggerContribution = {};
debugType = debugType.toLowerCase();
// merge all contributions into one
for (const ed of extensionDescriptions) {
if (ed.contributes) {
const debuggers = <debug.IRawAdapter[]>ed.contributes['debuggers'];
const debuggers = <debug.IDebuggerContribution[]>ed.contributes['debuggers'];
if (debuggers && debuggers.length > 0) {
const dbgs = debuggers.filter(d => strings.equalsIgnoreCase(d.type, debugType));
for (const dbg of dbgs) {
......
......@@ -9,7 +9,7 @@ import * as strings from 'vs/base/common/strings';
import * as objects from 'vs/base/common/objects';
import { IJSONSchema, IJSONSchemaSnippet } from 'vs/base/common/jsonSchema';
import { IWorkspaceFolder } from 'vs/platform/workspace/common/workspace';
import { IConfig, IRawAdapter, IAdapterExecutable, INTERNAL_CONSOLE_OPTIONS_SCHEMA, IConfigurationManager, IDebugAdapter, IDebugConfiguration } from 'vs/workbench/parts/debug/common/debug';
import { IConfig, IDebuggerContribution, IAdapterExecutable, INTERNAL_CONSOLE_OPTIONS_SCHEMA, IConfigurationManager, IDebugAdapter, IDebugConfiguration } from 'vs/workbench/parts/debug/common/debug';
import { IExtensionDescription } from 'vs/workbench/services/extensions/common/extensions';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { ICommandService } from 'vs/platform/commands/common/commands';
......@@ -21,7 +21,7 @@ export class Debugger {
private _mergedExtensionDescriptions: IExtensionDescription[];
constructor(private configurationManager: IConfigurationManager, private rawAdapter: IRawAdapter, public extensionDescription: IExtensionDescription,
constructor(private configurationManager: IConfigurationManager, private rawAdapter: IDebuggerContribution, public extensionDescription: IExtensionDescription,
@IConfigurationService private configurationService: IConfigurationService,
@ICommandService private commandService: ICommandService
) {
......@@ -82,7 +82,7 @@ export class Debugger {
return this.rawAdapter.languages;
}
public merge(secondRawAdapter: IRawAdapter, extensionDescription: IExtensionDescription): void {
public merge(secondRawAdapter: IDebuggerContribution, extensionDescription: IExtensionDescription): void {
// remember all ext descriptions that are the source of this debugger
this._mergedExtensionDescriptions.push(extensionDescription);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册