Ejemplo n.º 1
0
 public static String calcText(
     PsiModifierListOwner modifierListOwner, @NotNull String annotation) {
   final String shortName = annotation.substring(annotation.lastIndexOf('.') + 1);
   if (modifierListOwner instanceof PsiNamedElement) {
     final String name = ((PsiNamedElement) modifierListOwner).getName();
     if (name != null) {
       FindUsagesProvider provider =
           LanguageFindUsages.INSTANCE.forLanguage(modifierListOwner.getLanguage());
       return CodeInsightBundle.message(
           "inspection.i18n.quickfix.annotate.element.as",
           provider.getType(modifierListOwner),
           name,
           shortName);
     }
   }
   return CodeInsightBundle.message("inspection.i18n.quickfix.annotate.as", shortName);
 }