}
else {
getProjectModel().nodeChanged(node);
DataChannelDescriptor domain = (DataChannelDescriptor) mediator
.getProject()
.getRootNode();
// check for DataMap additions/removals...
Object[] mapsName = e.getDataNode().getDataMapNames().toArray();
int mapCount = mapsName.length;
// DataMap was linked
if (mapCount > node.getChildCount()) {
for (int i = 0; i < mapCount; i++) {
boolean found = false;
for (int j = 0; j < node.getChildCount(); j++) {
DefaultMutableTreeNode child = (DefaultMutableTreeNode) node
.getChildAt(j);
if (domain.getDataMap(mapsName[i].toString()) == child
.getUserObject()) {
found = true;
break;
}
}
if (!found) {
DefaultMutableTreeNode newMapNode = new DefaultMutableTreeNode(
domain.getDataMap(mapsName[i].toString()),
false);
positionNode(node, newMapNode, Comparators
.getNamedObjectComparator());
break;
}
}
}
// DataMap was unlinked
else if (mapCount < node.getChildCount()) {
for (int j = 0; j < node.getChildCount(); j++) {
boolean found = false;
DefaultMutableTreeNode child;
child = (DefaultMutableTreeNode) node.getChildAt(j);
Object obj = child.getUserObject();
for (int i = 0; i < mapCount; i++) {
if (domain.getDataMap(mapsName[i].toString()) == obj) {
found = true;
break;
}
}
if (!found) {