monitor .beginTask( Policy.bind("SVNProvider.Scrubbing_projects_1"), projects.length * 100);
monitor.beginTask("", projects.length * 100); monitor.setTaskName(Policy.bind("SVNProvider.Scrubbing_projects_1"));
	private void scrubProjects(IProject[] projects, IProgressMonitor monitor)			throws SVNException {		if (projects == null) {			if (monitor !=null)			{				monitor.done();			}			return;		}		if (monitor != null)		{			monitor				.beginTask(						Policy.bind("SVNProvider.Scrubbing_projects_1"), projects.length * 100); //$NON-NLS-1$		}		try {			for (int i = 0; i < projects.length; i++) {				IProject project = projects[i];				if (project != null && project.exists()) {					if (!project.isOpen()) {						project.open((monitor != null) ? Policy.subMonitorFor(monitor, 10) : null);					}					// We do not want to delete the project to avoid a project					// deletion delta					// We do not want to delete the .project to avoid core					// exceptions					if (monitor != null)					{						monitor.subTask(Policy							.bind("SVNProvider.Scrubbing_local_project_1")); //$NON-NLS-1$					}					// unmap the project from any previous repository provider					if (RepositoryProvider.getProvider(project) != null)						RepositoryProvider.unmap(project);					IResource[] children = project							.members(IContainer.INCLUDE_TEAM_PRIVATE_MEMBERS);					IProgressMonitor subMonitor = (monitor != null) ? Policy.subMonitorFor(monitor,							80) : null;					if (subMonitor != null)					{						subMonitor.beginTask(null, children.length * 100);					}					try {						for (int j = 0; j < children.length; j++) {							if (!children[j].getName().equals(".project")) {//$NON-NLS-1$								children[j].delete(true /* force */, (subMonitor != null) ? Policy										.subMonitorFor(subMonitor, 100) : null);							}						}					} finally {						if (subMonitor != null)						{							subMonitor.done();						}					}				} else if (project != null) {					// Make sure there is no directory in the local file system.					File location = new File(project.getParent().getLocation()							.toFile(), project.getName());					if (location.exists()) {						deepDelete(location);					}				}			}		} catch (CoreException e) {			throw SVNException.wrapException(e);		} finally {			if (monitor != null)			{				monitor.done();			}		}	}