提交 879fa611 编写于 作者: I isidor

debug: no need for model.clearWatchExpressions

上级 bf4a478f
......@@ -919,15 +919,6 @@ export class Model implements debug.IModel {
});
}
public clearWatchExpressionValues(): void {
this.watchExpressions.forEach(we => {
we.value = Expression.DEFAULT_VALUE;
we.available = false;
});
this._onDidChangeWatchExpressions.fire();
}
public removeWatchExpressions(id: string = null): void {
this.watchExpressions = id ? this.watchExpressions.filter(we => we.getId() !== id) : [];
this._onDidChangeWatchExpressions.fire();
......
......@@ -450,12 +450,8 @@ export class DebugService implements debug.IDebugService {
this.viewModel.setFocusedStackFrame(focusedStackFrame, process);
this._onDidChangeState.fire();
if (focusedStackFrame) {
return this.model.evaluateWatchExpressions(process, focusedStackFrame);
} else {
this.model.clearWatchExpressionValues();
return TPromise.as(null);
}
return this.model.evaluateWatchExpressions(process, focusedStackFrame);
}
public enableOrDisableBreakpoints(enable: boolean, breakpoint?: debug.IEnablement): TPromise<void> {
......
......@@ -303,7 +303,7 @@ suite('Debug - Model', () => {
model.renameWatchExpression(process, stackFrame, watchExpressions[1].getId(), 'new_name').done();
assertWatchExpressions(model.getWatchExpressions(), 'new_name');
model.clearWatchExpressionValues();
model.evaluateWatchExpressions(process, null);
assertWatchExpressions(model.getWatchExpressions(), 'new_name');
model.removeWatchExpressions();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册