}
private static void addComponentReferencesToTree(ComponentTreeNode tree,
List<ComponentReference> componentReferenceList) {
for (ComponentReference componentReference : componentReferenceList) {
ComponentTreeNode componentTreeNode = new ComponentTreeNode(componentReference);
if (componentReference.isParentComponent()){
addComponentReferencesToTree(componentTreeNode, componentReference.getChildComponentReferences());
}
tree.add(componentTreeNode);
}