ISelectionStatusValidator validator = getContainerDialogSelectionValidator();
ViewerFilter filter = getContainerDialogViewerFilter();
ITreeContentProvider contentProvider = new WorkbenchContentProvider();
ILabelProvider labelProvider = new DecoratingLabelProvider(new WorkbenchLabelProvider(), PlatformUI.getWorkbench()
.getDecoratorManager().getLabelDecorator());
ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(getShell(), labelProvider, contentProvider);
dialog.setValidator(validator);
dialog.setTitle(WizardConstants.CONTAINER_SELECTION_DIALOG_TITLE);
dialog.setMessage(WizardConstants.CONTAINER_SELECTION_DIALOG_DESC);
dialog.addFilter(filter);
String projectName = projectNameCombo.getText();;
if (projectName==null || projectName.length()==0)
return;
IProject project = ResourcesPlugin.getWorkspace().getRoot().findMember(projectName).getProject();
dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
if (project != null)
dialog.setInitialSelection(project);
if (dialog.open() == Window.OK) {
Object element = dialog.getFirstResult();
try {
if (element instanceof IContainer) {
IContainer container = (IContainer) element;
folderText.setText(container.getFullPath().toString());
model.put("JAVA_PACKAGE_FRAGMENT_ROOT", null);