Bug 8476 JAR Packager: Make main class field editable
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
dialog.addFilter(new LibraryFilter());
		dialog.addFilter(new SealPackagesFilter(packages));
		dialog.setValidator(new ISelectionValidator() {
			public IStatus validate(Object[] selection) {
				StatusInfo res= new StatusInfo();
				for (int i= 0; i < selection.length; i++) {
					if (!(selection[i] instanceof IPackageFragment)) {
						res.setError(JarPackagerMessages.getString("JarManifestWizardPage.error.mustContainPackages")); 
						return res;
					}
				}
				res.setOK();
				return res;
			}
		});
		return dialog;		
	}
	/**
	 * Converts selection dialog results into an array of IPackageFragments.
	 * An empty array is returned in case of errors.
	 * @throws ClassCastException if results are not IPackageFragments
	 */
	protected IPackageFragment[] getPackagesFromDialog(SelectionDialog dialog) {
		if (dialog.getReturnCode() == dialog.OK && dialog.getResult().length > 0)
			return (IPackageFragment[])Arrays.asList(dialog.getResult()).toArray(new IPackageFragment[dialog.getResult().length]);
		else
			return new IPackageFragment[0];
	}
	/**
	 * Creates and returns a dialog to choose an existing workspace file.