if (node.isRoot()) {
return;
}
// delete reference in node
ExtensionHistory ext = (ExtensionHistory) Control.getSingleton()
.getExtensionLoader().getExtension("ExtensionHistory");
ext.getHistoryList().removeElement(node.getHistoryReference());
if (node.getHistoryReference() != null) {
node.getHistoryReference().delete();
}
// delete past reference in node
while (node.getPastHistoryReference().size() > 0) {
HistoryReference ref = (HistoryReference) node
.getPastHistoryReference().get(0);
ext.getHistoryList().removeElement(ref);
ref.delete();
node.getPastHistoryReference().remove(0);
}
map.removeNodeFromParent(node);