use of org.knime.workbench.repository.model.AbstractContainerObject in project knime-core by knime.
the class RepositoryManager method removeEmptyCategories.
private static void removeEmptyCategories(final AbstractContainerObject treeNode) {
for (IRepositoryObject object : treeNode.getChildren()) {
if (object instanceof AbstractContainerObject) {
AbstractContainerObject cat = (AbstractContainerObject) object;
removeEmptyCategories(cat);
if (!cat.hasChildren() && (cat.getParent() != null)) {
cat.getParent().removeChild((AbstractContainerObject) object);
}
}
}
}
Aggregations