MCPcopy Create free account
hub / github.com/Marus/cortex-debug / editNode

Method editNode

src/frontend/views/live-watch.ts:586–608  ·  view source on GitHub ↗
(node: LiveVariableNode)

Source from the content-addressed store, hash-verified

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;

Callers 1

editLiveWatchExprMethod · 0.80

Calls 6

saveStateMethod · 0.95
refreshMethod · 0.95
isRootChildMethod · 0.80
getNameMethod · 0.80
findNameMethod · 0.80
renameMethod · 0.80

Tested by

no test coverage detected