if (hasLinkedResources()) return (dest instanceof IJavaProject) || (dest instanceof IProject);
if (hasLinkedResources()){ if (dest instanceof IPackageFragmentRoot){ if (! isProjectPackageFragmentRoot((IPackageFragmentRoot)dest)) return false; } else { if ((!(dest instanceof IJavaProject)) && (! (dest instanceof IProject))) return false; for (Iterator iter= getLinkedResources().iterator(); iter.hasNext();) { IResource linkedResource= (IResource) iter.next(); if (dest.equals(linkedResource.getParent())) return false; } } }
	public final boolean isValidDestination(Object dest) throws JavaModelException{		if (hasLinkedResources())			return (dest instanceof IJavaProject) || (dest instanceof IProject);				if (dest instanceof IJavaProject){			IJavaProject jp= (IJavaProject)dest;			IPackageFragmentRoot root=getPackageFragmentRoot(jp); 			if (root != null)				return isValidDestination(root);			else				return isValidDestination(jp.getProject());			}					//only source folders are selected		if (hasSourceFolders())			return canCopySourceFolders(dest);				//only packages are selected		if (hasPackages())				return canCopyPackages(dest);				//only resources are selected		if (hasResources() && ! hasNonResources())				return canCopyResources(dest);					return isValidDestinationForCusAndFiles(dest);	}