int totalWork= countSelectedElements(); progressMonitor.beginTask(JarPackagerMessages.getString("JarFileExportOperation.exporting"), totalWork);
	public void singleRun(IProgressMonitor progressMonitor) throws InvocationTargetException, InterruptedException {		int totalWork= countSelectedElements();		progressMonitor.beginTask(JarPackagerMessages.getString("JarFileExportOperation.exporting"), totalWork); //$NON-NLS-1$		try {			if (!preconditionsOK())				throw new InvocationTargetException(null, JarPackagerMessages.getString("JarFileExportOperation.jarCreationFailedSeeDetails")); //$NON-NLS-1$			fJarWriter= new JarWriter(fJarPackage, fParentShell);			exportSelectedElements(progressMonitor);			if (getStatus().getSeverity() != IStatus.ERROR) {				progressMonitor.subTask(JarPackagerMessages.getString("JarFileExportOperation.savingFiles")); //$NON-NLS-1$				saveFiles();			}		} catch (IOException ex) {			String message= JarPackagerMessages.getFormattedString("JarFileExportOperation.unableToCreateJarFle",  ex.getMessage()); //$NON-NLS-1$			addError(message, ex);			throw new InvocationTargetException(ex, message);		} catch (CoreException ex) {			String message= JarPackagerMessages.getFormattedString("JarFileExportOperation.unableToCreateJarFileDueToInvalidManifest", ex.getMessage()); //$NON-NLS-1$			addError(message, ex);			throw new InvocationTargetException(ex, message);		} finally {			try {				if (fJarWriter != null)					fJarWriter.close();			} catch (IOException ex) {				String message= JarPackagerMessages.getFormattedString("JarFileExportOperation.unableToCloseJarFile", ex.getMessage()); //$NON-NLS-1$				addError(message, ex);				throw new InvocationTargetException(ex, message);			}			progressMonitor.done();		}	}