public static @IntentionName String calcText(PsiModifierListOwner modifierListOwner, @Nullable String annotation) {
    final String shortName = annotation == null ? null : annotation.substring(annotation.lastIndexOf('.') + 1);
    if (modifierListOwner instanceof PsiNamedElement) {
      final String name = PsiFormatUtil.formatSimple((PsiNamedElement)modifierListOwner);
      if (name != null) {
        JavaElementKind type = JavaElementKind.fromElement(modifierListOwner).lessDescriptive();
        if (shortName == null) {
          return JavaAnalysisBundle.message("inspection.i18n.quickfix.annotate.element", type.object(), name);
        }
        return JavaAnalysisBundle
          .message("inspection.i18n.quickfix.annotate.element.as", type.object(), name, shortName);
      }
    }
    if (shortName == null) {
      return JavaAnalysisBundle.message("inspection.i18n.quickfix.annotate");
    }
    return JavaAnalysisBundle.message("inspection.i18n.quickfix.annotate.as", shortName);
  }
public static @IntentionName String calcText(PsiModifierListOwner modifierListOwner, @Nullable String annotation)