boolean (final PsiElement element, final Project project, final DataContext dataContext, final PsiReference reference, final Editor editor) { if (isStaticInnerClass(element) && !JavaMoveClassesOrPackagesHandler.isReferenceInAnonymousClass(reference)) { final PsiElement targetContainer = LangDataKeys.TARGET_PSI_ELEMENT.getData(dataContext); PsiClass aClass = (PsiClass)element; SelectInnerOrMembersRefactoringDialog dialog = new SelectInnerOrMembersRefactoringDialog(aClass, project); if (dialog.showAndGet()) { final MoveHandlerDelegate moveHandlerDelegate = dialog.getRefactoringHandler(); if (moveHandlerDelegate != null) { moveHandlerDelegate.doMove(project, new PsiElement[]{aClass}, targetContainer, null); } } return true; } return false; }