// Note that we cannot iterate through the model, but must iterate over
// the nodes directly. This is to ensure that the operation is inserted
// even if the model has a KongaTreeFilter that filters out the parent
// (perhaps temporarily).
KongaTreeNode root = treeModel.getRoot();
for (KongaTreeNode node : root.breadthFirstEnumeration()) {
Object nodeObject = node.getUserObject();
if (nodeObject == rootFolder) {
return node;
}
}