提交 d841d1d7 编写于 作者: I isidor

debug: double click on variable to set value

上级 a7f869b3
......@@ -668,6 +668,22 @@ export class VariablesAccessibilityProvider implements tree.IAccessibilityProvid
}
}
export class VariablesController extends BaseDebugController {
protected onLeftClick(tree: tree.ITree, element: any, event: IMouseEvent): boolean {
// double click on primitive value: open input box to be able to set the value
if (element instanceof model.Variable && event.detail === 2) {
const expression = <debug.IExpression>element;
if (expression.reference === 0) {
this.debugService.getViewModel().setSelectedExpression(expression);
}
return true;
}
return super.onLeftClick(tree, element, event);
}
}
// watch expressions
export class WatchExpressionsActionProvider implements renderer.IActionProvider {
......
......@@ -75,7 +75,7 @@ export class VariablesView extends viewlet.CollapsibleViewletView {
dataSource: new viewer.VariablesDataSource(this.debugService),
renderer: this.instantiationService.createInstance(viewer.VariablesRenderer),
accessibilityProvider: new viewer.VariablesAccessibilityProvider(),
controller: new viewer.BaseDebugController(this.debugService, this.contextMenuService, new viewer.VariablesActionProvider(this.instantiationService))
controller: new viewer.VariablesController(this.debugService, this.contextMenuService, new viewer.VariablesActionProvider(this.instantiationService))
}, debugTreeOptions(nls.localize('variablesAriaTreeLabel', "Debug Variables")));
const viewModel = this.debugService.getViewModel();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册