void () { final PsiPackage psiPackage = (PsiPackage)element; final String oldName = psiPackage.getQualifiedName(); final String newName = super.getNewName(); if (!Comparing.strEqual(StringUtil.getPackageName(oldName), StringUtil.getPackageName(newName))) { setToSearchInComments(psiPackage, isSearchInComments()); if (isSearchForTextOccurrencesEnabled()) { setToSearchForTextOccurrences(psiPackage, isSearchInNonJavaFiles()); } invokeRefactoring(createRenameMoveProcessor(newName, psiPackage, isSearchInComments(), isSearchInNonJavaFiles())); } else { super.doAction(); } }