void () { XExpression expression = getExpression(); super.doOKAction(); int index = myRootNode.removeChildNode(myNode); XDebuggerWatchesManager watchesManager = null; if (myNode instanceof InlineWatchNodeImpl) { InlineWatch inlineWatch = ((InlineWatchNodeImpl)myNode).getWatch(); watchesManager = ((XDebuggerManagerImpl)XDebuggerManager.getInstance(getProject())).getWatchesManager(); watchesManager.inlineWatchesRemoved(Collections.singletonList(inlineWatch), (XInlineWatchesView)myWatchesView); } if (!XDebuggerUtilImpl.isEmptyExpression(expression) && index != -1) { if (myNode instanceof InlineWatchNodeImpl) { watchesManager.addInlineWatchExpression(expression, index, ((InlineWatchNodeImpl)myNode).getPosition(), false); } else { myWatchesView.addWatchExpression(expression, index, false); } } TreeUtil.selectNode(myTree, myNode); }