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
ByteArrayOutputStream manifestOutput= new ByteArrayOutputStream();
		ByteArrayInputStream fileInput= null;
		try {
			Manifest manifest= fJarPackage.getManifestProvider().create(fJarPackage);
			manifest.write(manifestOutput);
			fileInput= new ByteArrayInputStream(manifestOutput.toByteArray());
			IFile manifestFile= fJarPackage.getManifestFile();
			if (manifestFile.isAccessible()) {
				if (fJarPackage.allowOverwrite() || JarPackagerUtil.askForOverwritePermission(fParentShell, manifestFile.getFullPath().toString()))
					manifestFile.setContents(fileInput, true, true, null);
			} else
				manifestFile.create(fileInput, true, null);
		} finally {
			if (manifestOutput != null)
				manifestOutput.close();
			if (fileInput != null)
				fileInput.close();
		}
	}
	
	private boolean isAutoBuilding() {
		return ResourcesPlugin.getWorkspace().getDescription().isAutoBuilding();
	}
	private boolean isCompilerGeneratingSourceFileAttribute() {
		Object value= JavaCore.getOptions().get(COMPILER_SOURCE_FILE_ATTR);
		if (value instanceof String)
			return "generate".equalsIgnoreCase((String)value); 
		else
			return true; 
	}