提交 48127859 编写于 作者: I isidor

debug: dipose breakpoint widget on model changed.

上级 114b0a76
......@@ -13,6 +13,7 @@ import lifecycle = require('vs/base/common/lifecycle');
import dom = require('vs/base/browser/dom');
import { InputBox } from 'vs/base/browser/ui/inputbox/inputBox';
import { CommonEditorRegistry } from 'vs/editor/common/editorCommonExtensions';
import editorcommon = require('vs/editor/common/editorCommon');
import editorbrowser = require('vs/editor/browser/editorBrowser');
import { ZoneWidget } from 'vs/editor/contrib/zoneWidget/browser/zoneWidget';
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
......@@ -43,6 +44,7 @@ export class BreakpointWidget extends ZoneWidget {
this.breakpointWidgetVisible = keybindingService.createKey(CONTEXT_BREAKPOINT_WIDGET_VISIBLE, false);
this.breakpointWidgetVisible.set(true);
BreakpointWidget.INSTANCE = this;
this.toDispose.push(editor.addListener2(editorcommon.EventType.ModelChanged, () => this.dispose()));
}
public fillContainer(container: HTMLElement): void {
......
......@@ -7,7 +7,6 @@ import lifecycle = require('vs/base/common/lifecycle');
import editorcommon = require('vs/editor/common/editorCommon');
import { IWorkbenchContribution } from 'vs/workbench/common/contributions';
import { IDebugService, ModelEvents, ViewModelEvents, IBreakpoint, IRawBreakpoint, State } from 'vs/workbench/parts/debug/common/debug';
import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService';
import { IModelService } from 'vs/editor/common/services/modelService';
function toMap(arr: string[]): { [key: string]: boolean; } {
......@@ -48,7 +47,6 @@ export class DebugEditorModelManager implements IWorkbenchContribution {
constructor(
@IModelService private modelService: IModelService,
@IWorkbenchEditorService private editorService: IWorkbenchEditorService,
@IDebugService private debugService: IDebugService
) {
this.modelData = {};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册