finalize DebugAdapterDescriptorFactory API: fixes #62977

This commit is contained in:
Andre Weinand
2018-11-26 23:54:10 +01:00
parent daf4deaf0c
commit 4201f517b1
6 changed files with 122 additions and 125 deletions

View File

@@ -14,12 +14,12 @@ import {
IMainContext, IBreakpointsDeltaDto, ISourceMultiBreakpointDto, IFunctionBreakpointDto, IDebugSessionDto
} from 'vs/workbench/api/node/extHost.protocol';
import * as vscode from 'vscode';
import { Disposable, Position, Location, SourceBreakpoint, FunctionBreakpoint, DebugAdapterServer, DebugAdapterExecutable, DebugAdapterImplementation } from 'vs/workbench/api/node/extHostTypes';
import { Disposable, Position, Location, SourceBreakpoint, FunctionBreakpoint, DebugAdapterServer, DebugAdapterExecutable } from 'vs/workbench/api/node/extHostTypes';
import { ExecutableDebugAdapter, SocketDebugAdapter, AbstractDebugAdapter } from 'vs/workbench/parts/debug/node/debugAdapter';
import { ExtHostWorkspace } from 'vs/workbench/api/node/extHostWorkspace';
import { ExtHostExtensionService } from 'vs/workbench/api/node/extHostExtensionService';
import { ExtHostDocumentsAndEditors } from 'vs/workbench/api/node/extHostDocumentsAndEditors';
import { ITerminalSettings, IDebuggerContribution, IConfig, IDebugAdapter, IDebugAdapterServer, IDebugAdapterExecutable, IDebugAdapterImplementation, IAdapterDescriptor } from 'vs/workbench/parts/debug/common/debug';
import { ITerminalSettings, IDebuggerContribution, IConfig, IDebugAdapter, IDebugAdapterServer, IDebugAdapterExecutable, IAdapterDescriptor } from 'vs/workbench/parts/debug/common/debug';
import { getTerminalLauncher, hasChildprocesses, prepareCommand } from 'vs/workbench/parts/debug/node/terminals';
import { IWorkspaceFolder } from 'vs/platform/workspace/common/workspace';
import { AbstractVariableResolverService } from 'vs/workbench/services/configurationResolver/node/variableResolver';
@@ -242,6 +242,14 @@ export class ExtHostDebugService implements ExtHostDebugServiceShape {
return new Disposable(() => { });
}
if (provider.debugAdapterExecutable) {
console.error('DebugConfigurationProvider.debugAdapterExecutable is deprecated and will be removed soon; please use DebugAdapterDescriptorFactory.createDebugAdapterDescriptor instead.');
}
if (provider.provideDebugAdapterTracker) {
// console.error('DebugConfigurationProvider.provideDebugAdapterTracker is deprecated and will be removed soon; please use DebugAdapterTrackerFactory.createDebugAdapterTracker instead.');
}
let handle = this._configProviderHandleCounter++;
this._configProviders.push({ type, handle, provider });
@@ -628,12 +636,12 @@ export class ExtHostDebugService implements ExtHostDebugServiceShape {
port: x.port,
host: x.host
};
} else if (x instanceof DebugAdapterImplementation) {
} else /* if (x instanceof DebugAdapterImplementation) {
return <IDebugAdapterImplementation>{
type: 'implementation',
implementation: x.implementation
};
} else {
} else */ {
throw new Error('unexpected type');
}
}