if (destination.equals(commonParent) || destination.getParent().equals(commonParent)) return RefactoringStatus.createFatalErrorStatus("The selected elements cannot be the destination of this move operation."); if (commonParent instanceof IResource){ IJavaElement commonJavaParent= JavaCore.create((IResource)commonParent); if (commonJavaParent != null && commonJavaParent.exists()){ if (destination.equals(commonParent) || destination.getParent().equals(commonParent)) return RefactoringStatus.createFatalErrorStatus("The selected elements cannot be the destination of this move operation."); } }
if (destination.equals(commonParent)) return RefactoringStatus.createFatalErrorStatus("The selected element cannot be the destination of this move operation."); IContainer destinationAsContainer= getDestinationAsContainer(); if (destinationAsContainer != null && destinationAsContainer.equals(commonParent)) return RefactoringStatus.createFatalErrorStatus("The selected element cannot be the destination of this move operation."); IPackageFragment destinationAsPackage= getDestinationAsPackageFragment(); if (destinationAsPackage != null && destinationAsPackage.equals(commonParent)) return RefactoringStatus.createFatalErrorStatus("The selected element cannot be the destination of this move operation.");
		protected RefactoringStatus verifyDestination(IJavaElement destination) throws JavaModelException {			RefactoringStatus superStatus= super.verifyDestination(destination);			if (superStatus.hasFatalError())				return superStatus;			Object commonParent= new ParentChecker(getResources(), getJavaElements()).getCommonParent();			if (destination.equals(commonParent) || destination.getParent().equals(commonParent))				return RefactoringStatus.createFatalErrorStatus("The selected elements cannot be the destination of this move operation.");			if (commonParent instanceof IResource){				IJavaElement commonJavaParent= JavaCore.create((IResource)commonParent);				if (commonJavaParent != null && commonJavaParent.exists()){					if (destination.equals(commonParent) || destination.getParent().equals(commonParent))						return RefactoringStatus.createFatalErrorStatus("The selected elements cannot be the destination of this move operation.");									}			}			return superStatus;		}