ListSelectionDialog dialog= new ListSelectionDialog(getContainer().getShell(), packages, new org.eclipse.jdt.internal.ui.viewsupport.ListContentProvider(), new JavaElementLabelProvider(flags), null);
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")); return; } } res.setOK(); } });
	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);		}		ListSelectionDialog dialog= new ListSelectionDialog(getContainer().getShell(), packages, new org.eclipse.jdt.internal.ui.viewsupport.ListContentProvider(), new JavaElementLabelProvider(flags), null);		return dialog;			}