TypedElementSelectionValidator validator= new TypedElementSelectionValidator(acceptedClasses, existing == null);
TypedElementSelectionValidator validator= new TypedElementSelectionValidator(acceptedClasses, existing == null, getExistingContainers(null));
	private CPListElement[] openSourceContainerDialog(CPListElement existing) {				Class[] acceptedClasses= new Class[] { IProject.class, IFolder.class };		TypedElementSelectionValidator validator= new TypedElementSelectionValidator(acceptedClasses, existing == null);				IProject[] allProjects= fWorkspaceRoot.getProjects();		ArrayList rejectedElements= new ArrayList(allProjects.length);		IProject currProject= fCurrJProject.getProject();		for (int i= 0; i < allProjects.length; i++) {			if (!allProjects[i].equals(currProject)) {				rejectedElements.add(allProjects[i]);			}		}		ViewerFilter filter= new TypedViewerFilter(acceptedClasses, rejectedElements.toArray());				ILabelProvider lp= new WorkbenchLabelProvider();		ITreeContentProvider cp= new WorkbenchContentProvider();		String title= (existing == null) ? NewWizardMessages.getString("SourceContainerWorkbookPage.ExistingSourceFolderDialog.new.title") : NewWizardMessages.getString("SourceContainerWorkbookPage.ExistingSourceFolderDialog.edit.title"); //$NON-NLS-1$ //$NON-NLS-2$		String message= (existing == null) ? NewWizardMessages.getString("SourceContainerWorkbookPage.ExistingSourceFolderDialog.new.description") : NewWizardMessages.getString("SourceContainerWorkbookPage.ExistingSourceFolderDialog.edit.description"); //$NON-NLS-1$ //$NON-NLS-2$		FolderSelectionDialog dialog= new FolderSelectionDialog(getShell(), lp, cp);		dialog.setValidator(validator);		dialog.setTitle(title);		dialog.setMessage(message);		dialog.addFilter(filter);		dialog.setInput(fCurrJProject.getProject().getParent());		dialog.setSorter(new ResourceSorter(ResourceSorter.NAME));		if (existing == null) {			dialog.setInitialSelection(fCurrJProject.getProject());		} else {			dialog.setInitialSelection(existing.getResource());		}				if (dialog.open() == FolderSelectionDialog.OK) {			Object[] elements= dialog.getResult();				CPListElement[] res= new CPListElement[elements.length];			for (int i= 0; i < res.length; i++) {				IResource elem= (IResource)elements[i];				res[i]= newCPSourceElement(elem);			}			return res;		}		return null;	}