提交 bf5a52e2 编写于 作者: I isidor

debugSession.dispose -> debugSession.shutdown

上级 5f7d8d49
......@@ -136,7 +136,7 @@ export interface LoadedSourceEvent {
source: Source;
}
export interface IDebugSession extends ITreeElement, IDisposable {
export interface IDebugSession extends ITreeElement {
readonly configuration: IConfig;
readonly unresolvedConfiguration: IConfig;
......@@ -151,16 +151,19 @@ export interface IDebugSession extends ITreeElement, IDisposable {
rawUpdate(data: IRawModelUpdate): void;
// session events
onDidEndAdapter: Event<AdapterEndEvent>;
onDidChangeState: Event<State>;
readonly onDidEndAdapter: Event<AdapterEndEvent>;
readonly onDidChangeState: Event<State>;
// DA capabilities
readonly capabilities: DebugProtocol.Capabilities;
// DAP events
onDidLoadedSource: Event<LoadedSourceEvent>;
onDidCustomEvent: Event<DebugProtocol.Event>;
readonly onDidLoadedSource: Event<LoadedSourceEvent>;
readonly onDidCustomEvent: Event<DebugProtocol.Event>;
// Disconnects and clears state
shutdown(): void;
// DAP request
......
......@@ -411,7 +411,7 @@ export class DebugService implements IDebugService {
private doCreateSession(root: IWorkspaceFolder, configuration: { resolved: IConfig, unresolved: IConfig }): TPromise<any> {
const session = <IDebugSession>this.instantiationService.createInstance(DebugSession, configuration, root, this.model);
const session = this.instantiationService.createInstance(DebugSession, configuration, root, this.model);
this.allSessions.set(session.getId(), session);
// register listeners as the very first thing!
......@@ -455,7 +455,7 @@ export class DebugService implements IDebugService {
}).then(() => session, (error: Error | string) => {
if (session) {
session.dispose();
session.shutdown();
}
if (errors.isPromiseCanceledError(error)) {
......@@ -481,7 +481,7 @@ export class DebugService implements IDebugService {
}).then(undefined, error => {
if (session) {
session.dispose();
session.shutdown();
}
if (errors.isPromiseCanceledError(error)) {
......@@ -522,7 +522,7 @@ export class DebugService implements IDebugService {
this.notificationService.error(err)
);
}
session.dispose();
session.shutdown();
this._onDidEndSession.fire(session);
const focusedSession = this.viewModel.focusedSession;
......
......@@ -122,7 +122,7 @@ export class DebugSession implements IDebugSession {
if (this._raw) {
// if there was already a connection make sure to remove old listeners
this.dispose(); // TODO: do not use dispose for this!
this.shutdown();
}
return dbgr.getCustomTelemetryService().then(customTelemetryService => {
......@@ -723,7 +723,7 @@ export class DebugSession implements IDebugSession {
}));
}
dispose(): void {
shutdown(): void {
dispose(this.rawListeners);
this.model.clearThreads(this.getId(), true);
this.model.removeSession(this.getId());
......
......@@ -263,7 +263,7 @@ export class MockSession implements IDebugSession {
throw new Error('Method not implemented.');
}
dispose(): void { }
shutdown(): void { }
}
export class MockRawSession {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册