From 33e6f45d31a6f4f7516296eaf4c5f8fdb36ba105 Mon Sep 17 00:00:00 2001 From: isidor Date: Thu, 10 Nov 2016 11:24:42 +0100 Subject: [PATCH] debug: rename setFocusedStackFrameAndEvaluate -> focusStackFrameAndEvaluate --- src/vs/workbench/parts/debug/browser/debugActions.ts | 2 +- src/vs/workbench/parts/debug/common/debug.ts | 2 +- .../parts/debug/electron-browser/debugService.ts | 12 ++++++------ .../parts/debug/electron-browser/debugViewer.ts | 2 +- .../workbench/parts/debug/test/common/mockDebug.ts | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/vs/workbench/parts/debug/browser/debugActions.ts b/src/vs/workbench/parts/debug/browser/debugActions.ts index 0a13e506f4a..d68f2bc0c4a 100644 --- a/src/vs/workbench/parts/debug/browser/debugActions.ts +++ b/src/vs/workbench/parts/debug/browser/debugActions.ts @@ -735,6 +735,6 @@ export class FocusProcessAction extends AbstractDebugAction { public run(processName: string): TPromise { const process = this.debugService.getModel().getProcesses().filter(p => p.name === processName).pop(); - return this.debugService.setFocusedStackFrameAndEvaluate(null, process); + return this.debugService.focusStackFrameAndEvaluate(null, process); } } diff --git a/src/vs/workbench/parts/debug/common/debug.ts b/src/vs/workbench/parts/debug/common/debug.ts index ef63b8fa84e..bd1d3b59072 100644 --- a/src/vs/workbench/parts/debug/common/debug.ts +++ b/src/vs/workbench/parts/debug/common/debug.ts @@ -372,7 +372,7 @@ export interface IDebugService { /** * Sets the focused stack frame and evaluates all expresions against the newly focused stack frame, */ - setFocusedStackFrameAndEvaluate(focusedStackFrame: IStackFrame, process?: IProcess): TPromise; + focusStackFrameAndEvaluate(focusedStackFrame: IStackFrame, process?: IProcess): TPromise; /** * Adds new breakpoints to the model for the file specified with the uri. Notifies debug adapter of breakpoint changes. diff --git a/src/vs/workbench/parts/debug/electron-browser/debugService.ts b/src/vs/workbench/parts/debug/electron-browser/debugService.ts index e2484e92b20..152efc076f4 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugService.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugService.ts @@ -280,13 +280,13 @@ export class DebugService implements debug.IDebugService { if (callStack.length > 0) { // focus first stack frame from top that has source location const stackFrameToFocus = first(callStack, sf => sf.source && sf.source.available, callStack[0]); - this.setFocusedStackFrameAndEvaluate(stackFrameToFocus).done(null, errors.onUnexpectedError); + this.focusStackFrameAndEvaluate(stackFrameToFocus).done(null, errors.onUnexpectedError); this.windowService.getWindow().focus(); aria.alert(nls.localize('debuggingPaused', "Debugging paused, reason {0}, {1} {2}", event.body.reason, stackFrameToFocus.source ? stackFrameToFocus.source.name : '', stackFrameToFocus.lineNumber)); return this.openOrRevealSource(stackFrameToFocus.source, stackFrameToFocus.lineNumber, false, false); } else { - this.setFocusedStackFrameAndEvaluate(null).done(null, errors.onUnexpectedError); + this.focusStackFrameAndEvaluate(null).done(null, errors.onUnexpectedError); } }); } @@ -445,7 +445,7 @@ export class DebugService implements debug.IDebugService { return !!this.contextService.getWorkspace(); } - public setFocusedStackFrameAndEvaluate(focusedStackFrame: debug.IStackFrame, process?: debug.IProcess): TPromise { + public focusStackFrameAndEvaluate(focusedStackFrame: debug.IStackFrame, process?: debug.IProcess): TPromise { const processes = this.model.getProcesses(); if (!process) { process = focusedStackFrame ? focusedStackFrame.thread.process : processes.length ? processes[0] : null; @@ -512,7 +512,7 @@ export class DebugService implements debug.IDebugService { this.telemetryService.publicLog('debugService/addReplExpression'); return this.model.addReplExpression(this.viewModel.focusedProcess, this.viewModel.focusedStackFrame, name) // Evaluate all watch expressions again since repl evaluation might have changed some. - .then(() => this.setFocusedStackFrameAndEvaluate(this.viewModel.focusedStackFrame)); + .then(() => this.focusStackFrameAndEvaluate(this.viewModel.focusedStackFrame)); } public logToRepl(value: string | { [key: string]: any }, severity?: severity): void { @@ -802,7 +802,7 @@ export class DebugService implements debug.IDebugService { } this.model.removeProcess(session.getId()); - this.setFocusedStackFrameAndEvaluate(null).done(null, errors.onUnexpectedError); + this.focusStackFrameAndEvaluate(null).done(null, errors.onUnexpectedError); this.setStateAndEmit(session.getId(), debug.State.Inactive); if (this.model.getProcesses().length === 0) { @@ -906,7 +906,7 @@ export class DebugService implements debug.IDebugService { private transitionToRunningState(session: RawDebugSession, threadId?: number): void { this.model.clearThreads(session.getId(), false, threadId); this.setStateAndEmit(session.getId(), session.requestType === debug.SessionRequestType.LAUNCH_NO_DEBUG ? debug.State.RunningNoDebug : debug.State.Running); - this.setFocusedStackFrameAndEvaluate(null).done(null, errors.onUnexpectedError); + this.focusStackFrameAndEvaluate(null).done(null, errors.onUnexpectedError); } private getDebugStringEditorInput(process: debug.IProcess, source: Source, value: string, mtype: string): DebugStringEditorInput { diff --git a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts index 307d0814feb..b115b794f81 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts @@ -295,7 +295,7 @@ export class CallStackController extends BaseDebugController { process = element; } - this.debugService.setFocusedStackFrameAndEvaluate(stackFrame, process).done(null, errors.onUnexpectedError); + this.debugService.focusStackFrameAndEvaluate(stackFrame, process).done(null, errors.onUnexpectedError); if (stackFrame) { const sideBySide = (event && (event.ctrlKey || event.metaKey)); diff --git a/src/vs/workbench/parts/debug/test/common/mockDebug.ts b/src/vs/workbench/parts/debug/test/common/mockDebug.ts index 7b2f9fddc0d..e9b98bbf4ed 100644 --- a/src/vs/workbench/parts/debug/test/common/mockDebug.ts +++ b/src/vs/workbench/parts/debug/test/common/mockDebug.ts @@ -25,7 +25,7 @@ export class MockDebugService implements debug.IDebugService { return null; } - public setFocusedStackFrameAndEvaluate(focusedStackFrame: debug.IStackFrame): TPromise { + public focusStackFrameAndEvaluate(focusedStackFrame: debug.IStackFrame): TPromise { return TPromise.as(null); } -- GitLab