boolean (PsiElement element, Set<PsiMember> movedMembers) { PsiElement parent = element; while (parent != null) { if (movedMembers.contains(parent)) return true; parent = parent.getParent(); } return false; }