Bug 14531 Unable to use JarPackager headless
Beginning with the 04/23 Integration build, I am unable to utilize the JarPackager in a headless environment. Specifically, I have defined my own Ant tasks which perform operations including jar packaging. The problem is in JarFileExportOperation.getDirtyEditors(Shell parent). Is it possible to accept null for parent and have the method just return an empty array?
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
*/
	private IFile[] getUnsavedFiles() {
		IEditorPart[] dirtyEditors= getDirtyEditors(fParentShell);
		Set unsavedFiles= new HashSet(dirtyEditors.length);
		if (dirtyEditors.length > 0) {
			List selection= JarPackagerUtil.asResources(fJarPackage.getElements());
			for (int i= 0; i < dirtyEditors.length; i++) {
				if (dirtyEditors[i].getEditorInput() instanceof IFileEditorInput) {
					IFile dirtyFile= ((IFileEditorInput)dirtyEditors[i].getEditorInput()).getFile();
					if (JarPackagerUtil.contains(selection, dirtyFile)) {
						unsavedFiles.add(dirtyFile);
					}
				}
			}
		}
		return (IFile[])unsavedFiles.toArray(new IFile[unsavedFiles.size()]);
	}
	/**
	 * Asks the user to confirm to save the modified resources.
	 * 
	 * @return true if user pressed OK.
	 */
	private boolean confirmSaveModifiedResources(IFile[] dirtyFiles) {
		if (dirtyFiles == null || dirtyFiles.length == 0)
			return true;
		
		Display display= fParentShell.getDisplay();
		if (display == null || display.isDisposed())
			return false;