dfmdNode.add(queryNode);
}
}
}
this.setDataSourcesRoot(newRoot);
final XulTree tree = (XulTree) getDocument().getElementById(DATASOURCES_TREE_ID);
final String currentQuery = getCurrentQuery();
final int selectedQueryRow = findRowForObject(getDataSourcesRoot(), currentQuery, new int[]{0});
if (selectedQueryRow == -1)
{
final int[] selectedRows = new int[1];
selectedRows[0] = selectedQueryRow - 1; // have to subtract one for the (unshown) root
tree.setSelectedRows(selectedRows);
}
}