@Override
public void run() {
int i = 0;
for (int j = 0; j < parent.getChildCount(); j++) {
final DefaultMutableTreeNode node = (DefaultMutableTreeNode) parent.getChildAt(j);
final Info info = (Info) node.getUserObject();
final String name = info.getName();
if (i > 0) {
final DefaultMutableTreeNode prev = (DefaultMutableTreeNode) parent.getChildAt(j - 1);
final Info prevI = (Info) prev.getUserObject();
if (prevI.getClass().getName().equals(info.getClass().getName())) {
final String prevN = prevI.getName();
if (!prevI.getResource().isNew()
&& !info.getResource().isNew()
&& (prevN != null && prevN.compareTo(name) > 0)) {
parent.remove(j);
parent.insert(node, j - 1);
}