void (@NotNull XValueNodeImpl node, @NotNull String text) { @NotNull XValue value = node.getValueContainer(); @Nullable XValueModifier modifier = value.getModifier(); if (modifier instanceof XStringValueModifier) { XExpression expression = ((XStringValueModifier)modifier).stringToXExpression(text); Consumer<? super String> errorConsumer = (@NlsContexts.DialogMessage String errorMessage) -> Messages.showErrorDialog(node.getTree(), errorMessage); DebuggerUIUtil.setTreeNodeValue(node, expression, errorConsumer); } }