void (Element list, Project project, Collection<? super TreeItem<Pair<AbstractUrl, String>>> result) { for (Element favorite : list.getChildren(FAVORITES_ROOT)) { final String className = favorite.getAttributeValue(CLASS_NAME); final AbstractUrl abstractUrl = readUrlFromElement(favorite, project); if (abstractUrl != null) { final TreeItem<Pair<AbstractUrl, String>> treeItem = new TreeItem<>(Pair.create(abstractUrl, className)); result.add(treeItem); readFavoritesOneLevel(favorite, project, treeItem.getChildren()); } } }