(node: LiveVariableNode)
| 584 | } |
| 585 | |
| 586 | public editNode(node: LiveVariableNode) { |
| 587 | if (!node.isRootChild()) { |
| 588 | return; // Should never happen |
| 589 | } |
| 590 | const opts: vscode.InputBoxOptions = { |
| 591 | placeHolder: 'Enter a valid C/gdb expression. Must be a global variable expression', |
| 592 | ignoreFocusOut: true, |
| 593 | value: node.getName(), |
| 594 | prompt: 'Enter Live Watch Expression' |
| 595 | }; |
| 596 | vscode.window.showInputBox(opts).then((result) => { |
| 597 | result = result ? result.trim() : result; |
| 598 | if (result && (result !== node.getName())) { |
| 599 | if (this.variables.findName(result)) { |
| 600 | vscode.window.showInformationMessage(`Live Watch: Expression ${result} is already being watched`); |
| 601 | } else { |
| 602 | node.rename(result); |
| 603 | this.saveState(); |
| 604 | this.refresh(LiveWatchTreeProvider.session); |
| 605 | } |
| 606 | } |
| 607 | }); |
| 608 | } |
| 609 | |
| 610 | public moveUpNode(node: LiveVariableNode) { |
| 611 | const parent = node?.getParent() as LiveVariableNode; |
no test coverage detected