MainWindow mainWindow = (MainWindow) MZmineCore.getDesktop();
// Update the name of the project in the window title
mainWindow.updateTitle();
ProjectTree projectTree = mainWindow.getMainPanel()
.getProjectTree();
projectTree.setModel(treeModel);
// Expand the rows Raw data files and Peak lists items by
// default
int childCount = treeModel.getChildCount(treeModel.getRoot());
for (int i = 0; i < childCount; i++) {
TreeNode node = (TreeNode) treeModel.getChild(
treeModel.getRoot(), i);
TreeNode pathToRoot[] = treeModel.getPathToRoot(node);
TreePath path = new TreePath(pathToRoot);
projectTree.expandPath(path);
}
}
};
try {
if (SwingUtilities.isEventDispatchThread())