ElementTreeSelectionDialog dialog= new ElementTreeSelectionDialog(getContainer().getShell(), new JavaElementLabelProvider(flags), new JavaElementContentProvider(), true, false);
JavaElementContentProvider cp= new JavaElementContentProvider() { public boolean hasChildren(Object element) {  return !(element instanceof IPackageFragment) && super.hasChildren(element); } }; ElementTreeSelectionDialog dialog= new ElementTreeSelectionDialog(getContainer().getShell(), new JavaElementLabelProvider(flags), cp, true, false);
	protected SelectionDialog createPackageDialog(Set packageFragments) {		int flags= JavaElementLabelProvider.SHOW_CONTAINER					| JavaElementLabelProvider.SHOW_POSTIFIX_QUALIFICATION					| JavaElementLabelProvider.SHOW_CONTAINER_QUALIFICATION;		List packages= new ArrayList(packageFragments.size());		for (Iterator iter= packageFragments.iterator(); iter.hasNext();) {			IPackageFragment fragment= (IPackageFragment)iter.next();			boolean containsJavaElements= false;			int kind;			try {				kind= fragment.getKind();				containsJavaElements= fragment.getChildren().length > 0;			} catch (JavaModelException ex) {				ExceptionHandler.handle(ex, getContainer().getShell(), JarPackagerMessages.getString("JarManifestWizardPage.error.jarPackageWizardError.title"), JarPackagerMessages.getFormattedString("JarManifestWizardPage.error.jarPackageWizardError.message", fragment.getElementName())); //$NON-NLS-2$ //$NON-NLS-1$				continue;			}			if (kind != IPackageFragmentRoot.K_BINARY && containsJavaElements)				packages.add(fragment);		}		ElementTreeSelectionDialog dialog= new ElementTreeSelectionDialog(getContainer().getShell(), new JavaElementLabelProvider(flags), new JavaElementContentProvider(), true, false);		dialog.setInput(JavaCore.create(JavaPlugin.getDefault().getWorkspace().getRoot()));		dialog.addFilter(new EmptyInnerPackageFilter());				dialog.addFilter(new LibraryFilter());		dialog.addFilter(new SealPackagesFilter(packages));		dialog.setValidator(new ISelectionValidator() {			public void isValid(Object[] selection, StatusInfo res) {				for (int i= 0; i < selection.length; i++) {					if (!(selection[i] instanceof IPackageFragment)) {						res.setError(JarPackagerMessages.getString("JarManifestWizardPage.error.mustContainPackages")); //$NON-NLS-1$						return;					}				}				res.setOK();			}		});		return dialog;			}