Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Anatoliy Bazko <abazko@redhat.com>
  • Loading branch information
tolusha committed Jul 31, 2018
1 parent 147245c commit 73546f2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions packages/debug/src/browser/breakpoint/breakpoint-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export class BreakpointsManager implements FrontendApplicationContribution {
* @param editor the active text editor
* @param position the mouse position in the editor
*/
toggleBreakpoint(editor: TextEditor, position: Position): void {
async toggleBreakpoint(editor: TextEditor, position: Position): Promise<void> {
const debugSession = this.debugSessionManager.getActiveDebugSession();

const srcBreakpoint = this.createSourceBreakpoint(debugSession, editor, position);
Expand All @@ -92,7 +92,7 @@ export class BreakpointsManager implements FrontendApplicationContribution {

if (debugSession) {
const source = DebugUtils.toSource(editor.uri, debugSession);
this.breakpointApplier.applySessionBreakpoints(debugSession, source);
await this.breakpointApplier.applySessionBreakpoints(debugSession, source);
}

this.breakpointDecorator.applyDecorations(editor);
Expand All @@ -103,14 +103,14 @@ export class BreakpointsManager implements FrontendApplicationContribution {
* Returns all breakpoints for the given debug session.
* @param sessionId the debug session identifier
*/
get(sessionId: string | undefined): ExtDebugProtocol.AggregatedBreakpoint[] {
async get(sessionId: string | undefined): Promise<ExtDebugProtocol.AggregatedBreakpoint[]> {
return this.breakpointStorage.get().filter(b => b.sessionId === sessionId);
}

/**
* Returns all breakpoints.
*/
getAll(): ExtDebugProtocol.AggregatedBreakpoint[] {
async getAll(): Promise<ExtDebugProtocol.AggregatedBreakpoint[]> {
return this.breakpointStorage.get();
}

Expand Down Expand Up @@ -255,7 +255,7 @@ export class BreakpointsManager implements FrontendApplicationContribution {
debugSession.stacks(args).then(response => {
const frame = response.body.stackFrames[0];
if (frame) {
this.sourceOpener.open(frame).then(widget => this.lineDecorator.applyDecorations());
this.sourceOpener.open(frame).then(() => this.lineDecorator.applyDecorations());
}
});
}
Expand Down
2 changes: 1 addition & 1 deletion packages/debug/src/browser/debug-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { DebugSession } from './debug-model';
export class SourceOpener {
constructor(@inject(EditorManager) protected readonly editorManager: EditorManager) { }

async open(frame: DebugProtocol.StackFrame): Promise<EditorWidget> {
open(frame: DebugProtocol.StackFrame): Promise<EditorWidget> {
if (!frame.source) {
return Promise.reject(`The source '${frame.name}' to open is not specified.`);
}
Expand Down
6 changes: 3 additions & 3 deletions packages/debug/src/browser/view/debug-breakpoints-widget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ export class DebugBreakpointsWidget extends VirtualWidget {
return this.onDidDblClickBreakpointEmitter.event;
}

refreshBreakpoints(): void {
async refreshBreakpoints(): Promise<void> {
if (this.debugSession) {
this.breakpoints = this.breakpointManager.get(this.debugSession.sessionId);
this.breakpoints = await this.breakpointManager.get(this.debugSession.sessionId);
} else {
this.breakpoints = this.breakpointManager.getAll();
this.breakpoints = await this.breakpointManager.getAll();
}
super.update();
}
Expand Down

0 comments on commit 73546f2

Please sign in to comment.