class DeleteProjectFilesTask extends Task {

	private void deleteFolder(DomainFolder folder, TaskMonitor monitor) throws CancelledException {

		for (DomainFolder subFolder : folder.getFolders()) {
			monitor.checkCanceled();
			if (!selectedFolders.contains(subFolder)) {
				deleteFolder(subFolder, monitor);
			}
		}

		for (DomainFile file : folder.getFiles()) {
			monitor.checkCanceled();
			if (!selectedFiles.contains(file)) {
				deleteFile(file);
				monitor.incrementProgress(1);
			}
		}

		deleteEmptyFolder(folder);
	}

	public  DeleteProjectFilesTask(Set<DomainFolder> folders, Set<DomainFile> files, int fileCount,
			Component parent);

}