monitor.worked(300);
	public void run(IProgressMonitor monitor) throws InvocationTargetException {		try {			monitor.beginTask("", 500); //$NON-NLS-1$			monitor.setTaskName(				Policy.bind("GenerateSVNDiff.working")); //$NON-NLS-1$						OutputStream os;			if(toClipboard) {				os = new ByteArrayOutputStream();			} else {				os = new FileOutputStream(outputFile);			}            File tmpFile = File.createTempFile("sub",""); //$NON-NLS-1$ //$NON-NLS-2$            tmpFile.deleteOnExit();            ISVNLocalResource svnResource = SVNWorkspaceRoot.getSVNResourceFor(resource);            ISVNClientAdapter svnClient = svnResource.getRepository().getSVNClient();			try {                svnClient.diff(svnResource.getFile(),tmpFile,recursive);                                InputStream is = new FileInputStream(tmpFile);                byte[] buffer = new byte[30000];                int length;                while ((length = is.read(buffer)) != -1) {                    os.write(buffer,0,length);                                    }			} finally {				os.close();			}			boolean emptyDiff = false;						if(toClipboard) {								ByteArrayOutputStream baos = (ByteArrayOutputStream)os;				if(baos.size() == 0) {					emptyDiff = true;				} else {					TextTransfer plainTextTransfer = TextTransfer.getInstance();					Clipboard clipboard= new Clipboard(shell.getDisplay());							clipboard.setContents(						new String[]{baos.toString()}, 						new Transfer[]{plainTextTransfer});						clipboard.dispose();				}			} else {				if(outputFile.length() == 0) {					emptyDiff = true;					outputFile.delete();				}				}			//check for empty diff and report						if (emptyDiff) {				MessageDialog.openInformation(					shell,					Policy.bind("GenerateSVNDiff.noDiffsFoundTitle"), //$NON-NLS-1$					Policy.bind("GenerateSVNDiff.noDiffsFoundMsg")); //$NON-NLS-1$			}        } catch (Exception e) {                throw new InvocationTargetException(e);		} finally {			monitor.done();		}	}