// svn revert from projectviewer node. If the node is a directory, the revert // will recurse down the directory. _svn_revert(view) { // get project viewer and console dwm = view.getDockableWindowManager(); if (dwm == null) { return; } pv = dwm.getDockable("projectviewer"); con = dwm.getDockable("console"); // must have both -- pv to get the node, and console to run svn if (( pv == null ) || ( con == null )) { return; } // make them both visible dwm.showDockableWindow("console"); dwm.showDockableWindow("projectviewer"); // get the node from pv, either folder or file, either will work node = pv.getSelectedNode(); f = new File( node.getNodePath() ); path = f.getAbsolutePath(); recurse = f.isDirectory(); // run svn update on the selected item try { command = "svn revert " + (recurse ? "--recursive " : " ") + path; runInSystemShell( view, command); waitForConsole(view); } catch (Exception e) {} } _svn_revert(view);