String (@NotNull PsiMethod method, @NotNull PsiMethod superMethod, @NotNull String prefix) { StringBuilder sb = new StringBuilder(prefix); boolean isAbstract = method.hasModifierProperty(PsiModifier.ABSTRACT); boolean isSuperAbstract = superMethod.hasModifierProperty(PsiModifier.ABSTRACT); String key = isSameSignature(method, superMethod) ? (isSuperAbstract && !isAbstract ? "tooltip.implements.method.in" : "tooltip.overrides.method.in") : (isSuperAbstract && !isAbstract ? "tooltip.implements.method" : "tooltip.overrides.method"); return sb.append(JavaBundle.message(key)).append(" ").toString(); }