MoveDestination () { final String packageName = getTargetPackage().trim(); if (packageName.length() > 0 && !PsiNameHelper.getInstance(myManager.getProject()).isQualifiedName(packageName)) { Messages.showErrorDialog(myProject, JavaRefactoringBundle.message("please.enter.a.valid.target.package.name"), RefactoringBundle.message("move.title")); return null; } RecentsManager.getInstance(myProject).registerRecentEntry(RECENTS_KEY, packageName); PackageWrapper targetPackage = new PackageWrapper(myManager, packageName); if (!targetPackage.exists()) { if (isPreviewUsages()) { int res = Messages.showOkCancelDialog(myProject, JavaRefactoringBundle.message("package.does.not.exist.preview", packageName), RefactoringBundle.message("move.title"), CommonBundle.getOkButtonText(), CommonBundle.getCancelButtonText(), null); if (res != Messages.OK) return null; } else { final int ret = Messages.showYesNoDialog(myProject, JavaRefactoringBundle.message("package.does.not.exist", packageName), RefactoringBundle.message("move.title"), Messages.getQuestionIcon()); if (ret != Messages.YES) return null; } } return ((DestinationFolderComboBox)myDestinationFolderCB).selectDirectory(targetPackage, mySuggestToMoveToAnotherRoot); }