for (int i = 1; i < o.length; i++) {
TreeNode[] pathNodes = getPathToRoot((TreeNode) o[i]);
if (node == null || pathNodes[0].toString().compareTo("Plugins") != 0) {
TreeNode n1 = (TreeNode) o[i - 1];
@SuppressWarnings("unchecked")
Enumeration<DefaultMutableTreeNode> e1 = n1.children();
while (e1.hasMoreElements()) {
TreeNode n2 = e1.nextElement();
if (n2.toString().compareTo(o[i].toString()) == 0) {
o[i] = n2;
break;
}
}
}