String (PsiElement e, DescKind kind, boolean html) { e = getMavenElement(e); if (e == null) return null; if (e instanceof FakePsiElement) { return ((FakePsiElement)e).getPresentableText(); } boolean property = MavenDomUtil.isMavenProperty(e); String type = property ? MavenDomBundle.message("text.property") : MavenDomBundle.message("text.model.property"); if (kind == DescKind.TYPE) return type; String name = buildPropertyName(e, property); if (kind == DescKind.NAME) return name; if (kind == DescKind.TYPE_NAME_VALUE) { String br = html ? "<br>" : "\n "; String[] bold = html ? new String[]{"<b>", "</b>"} : new String[]{"", ""}; String valueSuffix = ""; if (e instanceof XmlTag) { valueSuffix = ": " + bold[0] + ((XmlTag)e).getValue().getTrimmedText() + bold[1]; } return type + br + name + valueSuffix; } MavenLog.LOG.error("unexpected desc kind: " + kind); return null; }