ElementTreeSelectionDialog dialog= new ElementTreeSelectionDialog(getShell(), lp, cp);
FolderSelectionDialog dialog= new FolderSelectionDialog(getShell(), lp, cp);
	private IContainer chooseOutputLocation() {		IWorkspaceRoot root= fCurrProject.getWorkspace().getRoot();		Class[] acceptedClasses= new Class[] { IProject.class, IFolder.class };		ISelectionStatusValidator validator= new TypedElementSelectionValidator(acceptedClasses, false);		IProject[] allProjects= root.getProjects();		ArrayList rejectedElements= new ArrayList(allProjects.length);		for (int i= 0; i < allProjects.length; i++) {			if (!allProjects[i].equals(fCurrProject)) {				rejectedElements.add(allProjects[i]);			}		}		ViewerFilter filter= new TypedViewerFilter(acceptedClasses, rejectedElements.toArray());		ILabelProvider lp= new WorkbenchLabelProvider();		ITreeContentProvider cp= new WorkbenchContentProvider();		IResource initSelection= null;		if (fOutputLocation != null) {			initSelection= root.findMember(fOutputLocation);		}		ElementTreeSelectionDialog dialog= new ElementTreeSelectionDialog(getShell(), lp, cp);		dialog.setTitle(NewWizardMessages.getString("OutputLocationDialog.ChooseOutputFolder.title")); //$NON-NLS-1$		dialog.setValidator(validator);		dialog.setMessage(NewWizardMessages.getString("OutputLocationDialog.ChooseOutputFolder.description")); //$NON-NLS-1$		dialog.addFilter(filter);		dialog.setInput(root);		dialog.setInitialSelection(initSelection);		dialog.setSorter(new ResourceSorter(ResourceSorter.NAME));		if (dialog.open() == ElementTreeSelectionDialog.OK) {			return (IContainer)dialog.getFirstResult();		}		return null;	}