public static @NotNull @InspectionMessage String unresolvedReferenceMessage(@NotNull PsiReference reference) {
    String message;
    if (reference instanceof EmptyResolveMessageProvider) {
      String pattern = ((EmptyResolveMessageProvider)reference).getUnresolvedMessagePattern();
      try {
        message = BundleBase.format(pattern, reference.getCanonicalText()); // avoid double formatting
      }
      catch (IllegalArgumentException ex) {
        // unresolvedMessage provided by third-party reference contains wrong format string (e.g. {}), tolerate it
        message = pattern;
        LOG.info(pattern);
      }
    }
    else {
      message = AnalysisBundle.message("error.cannot.resolve.default.message", reference.getCanonicalText());
    }
    return message;
  }
public static @NotNull @InspectionMessage String unresolvedReferenceMessage(@NotNull PsiReference reference)