LocalResourceStatus status = SVNWorkspaceRoot.getSVNResourceFor( resources[i] ).getStatus();
    public void run(IProgressMonitor monitor) throws SVNException {        // sort first, so that all children of a folder directly follow it in the array        Arrays.sort( resources, resourceComparator );                try {            ISVNClientAdapter svnClient = root.getRepository().getSVNClient();            OperationManager.getInstance().beginOperation(svnClient);                        for (int i = 0; i < resources.length; i++) {                // If a folder add is reverted, all the adds underneath it will be reverted too.                // Don't try to revert them. Because the resources are sorted by path we can just                // keep going along the IResource array until we find one that doesn't have the                 // current as a base path.                 if (resources[i].getType() == IResource.FOLDER && SVNWorkspaceRoot.getSVNResourceFor( resources[i] ).getStatus().isAdded()) {                    svnClient.revert(resources[i].getLocation().toFile(), true);                    monitor.worked(100);                    SVNWorkspaceRoot.getSVNFolderFor( (IContainer)resources[i] ).refreshStatus(IResource.DEPTH_INFINITE);                    // If folder path has no ending / we can have problem where dir foobar will look like subdir of foo                    String baseFullPath = resources[i].getFullPath().addTrailingSeparator().toString();                    while (i < resources.length - 1 && resources[i+1].getFullPath().toString().startsWith( baseFullPath )) {                        monitor.worked(100);                        i++;                    }                } else {                    svnClient.revert(resources[i].getLocation().toFile(), false);                    monitor.worked(100);                }            }        } catch (SVNClientException e) {            throw SVNException.wrapException(e);        } finally {            OperationManager.getInstance().endOperation();            monitor.done();        }    }