boolean (PsiFile file, PsiDirectory moveDestination, Map<PsiElement, PsiElement> oldToNewElementsMapping, List<? super PsiFile> movedFiles, RefactoringElementListener listener) { if (!(file instanceof PsiClassOwner)) { return false; } final PsiClass[] classes = ((PsiClassOwner)file).getClasses(); if (classes.length == 0) { return false; } if (FileTypeUtils.isInServerPageFile(file)) { return false; } for (PsiClass psiClass : classes) { final PsiClass newClass = MoveClassesOrPackagesUtil.doMoveClass(psiClass, moveDestination); oldToNewElementsMapping.put(psiClass, newClass); listener.elementMoved(newClass); } return true; }