String name = Strings.get("ProjectItemTree.LDAP");
buildLocatableSubTree(parent, name, "ProjectItemTree.Help.LDAP", new LocatableFilter(DataLocationType.LDAP));
}
private void buildLocatableSubTree(KongaTreeNode parent, String title, String helpId, EntityFilter filter) {
KongaTreeNode root = new DocumentedProjectItemNode(parent, title, helpId);
KongaTreeNode sources = new DefaultKongaTreeNode(root, EntityType.Source.toString(), true);
ItemTreeBuilder sourceTreeFactory = new ItemTreeBuilder(project, EntityType.Source);
sourceTreeFactory.setFilter(filter);
sourceTreeFactory.buildTree(sources);
KongaTreeNode targets = new DefaultKongaTreeNode(root, EntityType.Target.toString(), true);
ItemTreeBuilder targetTreeFactory = new ItemTreeBuilder(project, EntityType.Target);
targetTreeFactory.setFilter(filter);
targetTreeFactory.buildTree(targets);
}