private void moveAsPackage(Project project, PsiElement[] elements, PsiElement targetContainer, MoveCallback callback) {
    final PsiElement[] adjustedElements = MoveClassesOrPackagesImpl.adjustForMove(project, elements, targetContainer);
    if (adjustedElements == null) return;

    if (targetContainer instanceof PsiDirectory) {
      if (CommonRefactoringUtil.checkReadOnlyStatusRecursively(project, Arrays.asList(adjustedElements), true)) {
        if (!packageHasMultipleDirectoriesInModule(project, (PsiDirectory)targetContainer)) {
          var dialogue = createMoveClassesOrPackagesToNewDirectoryDialog((PsiDirectory)targetContainer, adjustedElements, callback);
          if (Boolean.getBoolean("ide.performance.skip.refactoring.dialogs"))
            dialogue.performOKAction();
          else
            dialogue.show();
          return;
        }
      }
    }
    doMoveWithMoveClassesDialog(project, adjustedElements, targetContainer, callback);
  }
private void moveAsPackage(Project project, PsiElement[] elements, PsiElement targetContainer, MoveCallback callback)