collapseAll(getNodeFromActionEvent(e).getModel());
}
private static void collapseAll(WorkspaceTreeModel model) {
TreeNode root = (TreeNode) model.getRoot();
IWorkspaceView view = WorkspaceController.getCurrentModeExtension().getView();
TreePath rootPath = new TreePath(root);
for (Enumeration<?> e=root.children(); e.hasMoreElements();) {
TreeNode n = (TreeNode) e.nextElement();
TreePath path = rootPath.pathByAddingChild(n);
collapseAll(view, model, path);