提交 f478f3e0 编写于 作者: I isidor

debug trees: minor polish

上级 4b7614ff
...@@ -32,9 +32,6 @@ import { onUnexpectedError } from 'vs/base/common/errors'; ...@@ -32,9 +32,6 @@ import { onUnexpectedError } from 'vs/base/common/errors';
const $ = dom.$; const $ = dom.$;
// TODO@Isidor Remember expanded elements when there are some (otherwise don't override/erase the previous ones)
// Just give the identity provider to the tree and that should solve it
export const variableSetEmitter = new Emitter<void>(); export const variableSetEmitter = new Emitter<void>();
export class VariablesView extends ViewletPanel { export class VariablesView extends ViewletPanel {
...@@ -126,10 +123,9 @@ export class VariablesView extends ViewletPanel { ...@@ -126,10 +123,9 @@ export class VariablesView extends ViewletPanel {
} }
private onMouseDblClick(e: ITreeMouseEvent<IExpression | IScope>): void { private onMouseDblClick(e: ITreeMouseEvent<IExpression | IScope>): void {
const element = e.element;
const session = this.debugService.getViewModel().focusedSession; const session = this.debugService.getViewModel().focusedSession;
if (element instanceof Variable && session.capabilities.supportsSetVariable) { if (e.element instanceof Variable && session.capabilities.supportsSetVariable) {
this.debugService.getViewModel().setSelectedExpression(element); this.debugService.getViewModel().setSelectedExpression(e.element);
} }
} }
...@@ -258,7 +254,6 @@ export class VariablesRenderer extends AbstractExpressionsRenderer { ...@@ -258,7 +254,6 @@ export class VariablesRenderer extends AbstractExpressionsRenderer {
} }
class VariablesAccessibilityProvider implements IAccessibilityProvider<IExpression | IScope> { class VariablesAccessibilityProvider implements IAccessibilityProvider<IExpression | IScope> {
getAriaLabel(element: IExpression | IScope): string { getAriaLabel(element: IExpression | IScope): string {
if (element instanceof Scope) { if (element instanceof Scope) {
return nls.localize('variableScopeAriaLabel', "Scope {0}, variables, debug", element.name); return nls.localize('variableScopeAriaLabel', "Scope {0}, variables, debug", element.name);
......
...@@ -195,7 +195,7 @@ class WatchExpressionsDataSource implements IDataSource<IExpression> { ...@@ -195,7 +195,7 @@ class WatchExpressionsDataSource implements IDataSource<IExpression> {
return true; return true;
} }
return (<IExpression>element).hasChildren; return element.hasChildren;
} }
getChildren(element: IExpression | null): Thenable<(IExpression)[]> { getChildren(element: IExpression | null): Thenable<(IExpression)[]> {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册