private TreeNode createSubTreeNode(TreeNode parent, String child) { TreeNode childNode = parent.getChild(child); if (childNode == null) { childNode = TreeNodeFactory.createTreeNode(child, null, child); parent.addChild(childNode); } else { // the childNode is found, but ensure that its enabled enableTreeNode(childNode); } return childNode; }