public static boolean checkReadOnlyStatus(@NotNull Project project, @NotNull PsiElement element) {
    return checkReadOnlyStatus(element, project, RefactoringBundle.message("refactoring.cannot.be.performed"));
  }
public static boolean checkReadOnlyStatus(@NotNull Project project, @NotNull PsiElement element)