}
final MapModel map = Controller.getCurrentModeController().getController().getMap();
final AttributeRegistry registry = AttributeRegistry.getRegistry(map);
final int iOld = registry.getElements().indexOf(oldName);
final AttributeRegistryElement oldElement = registry.getElement(iOld);
final SortedComboBoxModel values = oldElement.getValues();
final IActor registryActor = new RegistryAttributeActor(newName, oldElement.isManual(), oldElement.isVisible(),
registry, map);
Controller.getCurrentModeController().execute(registryActor, map);
final AttributeRegistryElement newElement = registry.getElement(newName);
for (int i = 0; i < values.getSize(); i++) {
final IActor registryValueActor = new RegistryAttributeValueActor(newElement, values.getElementAt(i)
.toString(), false);
Controller.getCurrentModeController().execute(registryValueActor, map);
}
final IVisitor replacer = new AttributeRenamer(oldName, newName);
final Iterator iterator = new Iterator(replacer);