use of com.intellij.debugger.ui.impl.watch.UserExpressionDescriptorImpl in project intellij-community by JetBrains.
the class RemoveCustomFieldAction method perform.
@Override
protected void perform(XValueNodeImpl node, @NotNull String nodeName, AnActionEvent e) {
UserExpressionDescriptorImpl descriptor = (UserExpressionDescriptorImpl) ((JavaValue) node.getValueContainer()).getDescriptor();
EnumerationChildrenRenderer enumerationChildrenRenderer = getParentEnumerationRenderer(descriptor);
if (enumerationChildrenRenderer != null) {
enumerationChildrenRenderer.getChildren().remove(descriptor.getEnumerationIndex());
TreeNode parent = node.getParent();
int index = parent.getIndex(node);
int indexToSelect = index + 1 < parent.getChildCount() ? index + 1 : index - 1;
TreeUtil.selectNode(node.getTree(), indexToSelect >= 0 ? parent.getChildAt(indexToSelect) : parent);
XDebuggerUtilImpl.rebuildTreeAndViews(node.getTree());
}
}
use of com.intellij.debugger.ui.impl.watch.UserExpressionDescriptorImpl in project intellij-community by JetBrains.
the class EditCustomFieldAction method perform.
@Override
protected void perform(XValueNodeImpl node, @NotNull String nodeName, AnActionEvent e) {
ValueDescriptorImpl descriptor = ((JavaValue) node.getValueContainer()).getDescriptor();
EnumerationChildrenRenderer enumerationChildrenRenderer = getParentEnumerationRenderer(descriptor);
if (enumerationChildrenRenderer != null) {
new CustomFieldInplaceEditor(node, (UserExpressionDescriptorImpl) descriptor, enumerationChildrenRenderer).show();
}
}
Aggregations