private static boolean isDeclarationOutOfProjectOrAbsent(final @NotNull Project project, final DataContext context) {
    final PsiElement[] elements = BaseRefactoringAction.getPsiElementArray(context);
    return elements.length == 0 || elements.length == 1 && shouldBeRenamedInplace(project, elements);
  }
private static boolean isDeclarationOutOfProjectOrAbsent(final @NotNull Project project, final DataContext context)