diff options
Diffstat (limited to 'src/vs/workbench/parts/debug/electron-browser')
3 files changed, 10 insertions, 10 deletions
diff --git a/src/vs/workbench/parts/debug/electron-browser/debugHover.ts b/src/vs/workbench/parts/debug/electron-browser/debugHover.ts index 9dec498f49a..3dd805e96a0 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugHover.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugHover.ts @@ -105,10 +105,10 @@ export class DebugHoverWidget implements IContentWidget { } private registerListeners(): void { - this.toDispose.push(this.tree.addListener('item:expanded', () => { + this.toDispose.push(this.tree.onDidExpandItem(() => { this.layoutTree(); })); - this.toDispose.push(this.tree.addListener('item:collapsed', () => { + this.toDispose.push(this.tree.onDidCollapseItem(() => { this.layoutTree(); })); diff --git a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts index e3e0580f11a..6ceb6e94793 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts @@ -299,7 +299,7 @@ export class CallStackController extends BaseDebugController { return true; } - public focusStackFrame(stackFrame: debug.IStackFrame, event: IKeyboardEvent | IMouseEvent, preserveFocus: boolean): void { + public focusStackFrame(stackFrame: debug.IStackFrame, event: any, preserveFocus: boolean): void { this.debugService.focusStackFrameAndEvaluate(stackFrame, undefined, true).then(() => { const sideBySide = (event && (event.ctrlKey || event.metaKey)); return stackFrame.openInEditor(this.editorService, preserveFocus, sideBySide); @@ -1290,7 +1290,7 @@ export class BreakpointsController extends BaseDebugController { return super.onLeftClick(tree, element, event); } - public openBreakpointSource(breakpoint: Breakpoint, event: IKeyboardEvent | IMouseEvent, preserveFocus: boolean): void { + public openBreakpointSource(breakpoint: Breakpoint, event: any, preserveFocus: boolean): void { if (breakpoint.uri.scheme === debug.DEBUG_SCHEME && this.debugService.state === debug.State.Inactive) { return; } diff --git a/src/vs/workbench/parts/debug/electron-browser/debugViews.ts b/src/vs/workbench/parts/debug/electron-browser/debugViews.ts index 77c31005f1c..b2324b2b712 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugViews.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugViews.ts @@ -10,7 +10,6 @@ import * as dom from 'vs/base/browser/dom'; import * as builder from 'vs/base/browser/builder'; import { TPromise } from 'vs/base/common/winjs.base'; import * as errors from 'vs/base/common/errors'; -import { EventType } from 'vs/base/common/events'; import { IAction } from 'vs/base/common/actions'; import { prepareActions } from 'vs/workbench/browser/actions'; import { IHighlightEvent, ITree } from 'vs/base/parts/tree/browser/tree'; @@ -29,6 +28,7 @@ import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/c import { IListService } from 'vs/platform/list/browser/listService'; import { attachListStyler } from 'vs/platform/theme/common/styler'; import { IThemeService } from 'vs/platform/theme/common/themeService'; +import { once } from 'vs/base/common/event'; function renderViewTree(container: HTMLElement): HTMLElement { const treeContainer = document.createElement('div'); @@ -136,7 +136,7 @@ export class VariablesView extends ViewsViewletPanel { this.tree.refresh(expression, false).then(() => { this.tree.setHighlight(expression); - this.tree.addOneTimeListener(EventType.HIGHLIGHT, (e: IHighlightEvent) => { + once(this.tree.onDidChangeHighlight)((e: IHighlightEvent) => { if (!e.highlight) { this.debugService.getViewModel().setSelectedExpression(null); } @@ -228,7 +228,7 @@ export class WatchExpressionsView extends ViewsViewletPanel { this.tree.refresh(expression, false).then(() => { this.tree.setHighlight(expression); - this.tree.addOneTimeListener(EventType.HIGHLIGHT, (e: IHighlightEvent) => { + once(this.tree.onDidChangeHighlight)((e: IHighlightEvent) => { if (!e.highlight) { this.debugService.getViewModel().setSelectedExpression(null); } @@ -319,7 +319,7 @@ export class CallStackView extends ViewsViewletPanel { this.disposables.push(attachListStyler(this.tree, this.themeService)); this.disposables.push(this.listService.register(this.tree)); - this.disposables.push(this.tree.addListener('selection', event => { + this.disposables.push(this.tree.onDidChangeSelection(event => { if (event && event.payload && event.payload.origin === 'keyboard') { const element = this.tree.getFocus(); if (element instanceof ThreadAndProcessIds) { @@ -454,7 +454,7 @@ export class BreakpointsView extends ViewsViewletPanel { this.disposables.push(attachListStyler(this.tree, this.themeService)); this.disposables.push(this.listService.register(this.tree, [this.breakpointsFocusedContext])); - this.disposables.push(this.tree.addListener('selection', event => { + this.disposables.push(this.tree.onDidChangeSelection(event => { if (event && event.payload && event.payload.origin === 'keyboard') { const element = this.tree.getFocus(); if (element instanceof Breakpoint) { @@ -474,7 +474,7 @@ export class BreakpointsView extends ViewsViewletPanel { this.tree.refresh(fbp, false).then(() => { this.tree.setHighlight(fbp); - this.tree.addOneTimeListener(EventType.HIGHLIGHT, (e: IHighlightEvent) => { + once(this.tree.onDidChangeHighlight)((e: IHighlightEvent) => { if (!e.highlight) { this.debugService.getViewModel().setSelectedFunctionBreakpoint(null); } |