ViewerFilter filter = new TypedViewerFilter(acceptedClasses,
rejectedElements.toArray());
ILabelProvider lp = new WorkbenchLabelProvider();
ITreeContentProvider cp = new WorkbenchContentProvider();
IResource initSelection = null;
FolderSelectionDialog dialog = new FolderSelectionDialog(getShell(),
lp, cp);
dialog.setTitle(NewWizardMessages.BuildPathsBlock_ChooseOutputFolderDialog_title);
dialog.setValidator(validator);
dialog.setMessage(NewWizardMessages.BuildPathsBlock_ChooseOutputFolderDialog_description);
dialog.addFilter(filter);
dialog.setInput(fWorkspaceRoot);
dialog.setInitialSelection(initSelection);
dialog.setComparator(new ResourceComparator(ResourceComparator.NAME));
if (dialog.open() == Window.OK) {
return (IContainer) dialog.getFirstResult();
}
return null;
}