@Override
public void valueCommitted(ValueEditorEvent e) {
ValueEditor source = (ValueEditor) e.getSource();
ValueNode oldChildValueNode = e.getOldValue();
ValueNode newChildValueNode = source.getValueNode();
if (!isEditable() || oldChildValueNode.sameValue(newChildValueNode)) {
return;
}
// Get the commit value map and update the editor panel value nodes.
Map<ValueNode, TypeExpr> valueNodeToUnconstrainedTypeMap = getValueNodeToUnconstrainedTypeMap();
Map<ValueNode, ValueNode> commitValueMap = valueEditorManager.getValueNodeCommitHelper().getCommitValues(oldChildValueNode, newChildValueNode, valueNodeToUnconstrainedTypeMap);
for (final DataConstructorEditorPanel editorPanel : editorPanelList) {
editorPanel.updateValueNode(commitValueMap);
}
// Replace the current value node with the value node of the active panel.
ValueNode newValueNode = null;
if (editorPanelList.size() == 1) {
newValueNode = editorPanelList.get(0).getValueNode().copyValueNode();
} else {
newValueNode = focusChangeListener.getFocusedPanel().getValueNode().copyValueNode();
}