@@ -38,7 +38,7 @@ public class ErlangDescriptionProvider implements ElementDescriptionProvider {
3838 @ Override
3939 public String getElementDescription (@ NotNull PsiElement o , @ NotNull ElementDescriptionLocation location ) {
4040 if (!(o instanceof ErlangCompositeElement )) return null ;
41- if (location == UsageViewNodeTextLocation .INSTANCE && (o instanceof ErlangNamedElement || o instanceof ErlangQAtom )) {
41+ if (location == UsageViewNodeTextLocation .INSTANCE && (o instanceof ErlangNamedElement || o instanceof ErlangQAtom || o instanceof ErlangTypeRef )) {
4242 return getElementDescription (o , UsageViewShortNameLocation .INSTANCE );
4343 }
4444 if (location == UsageViewShortNameLocation .INSTANCE ||
@@ -47,6 +47,7 @@ public String getElementDescription(@NotNull PsiElement o, @NotNull ElementDescr
4747 ) {
4848 if (o instanceof ErlangNamedElement ) return ((ErlangNamedElement ) o ).getName ();
4949 if (o instanceof ErlangQAtom ) return ErlangPsiImplUtil .getName ((ErlangQAtom )o );
50+ if (o instanceof ErlangTypeRef ) return o .getText ();
5051 if (o instanceof ErlangAttribute ) {
5152 ErlangSpecification spec = ((ErlangAttribute ) o ).getSpecification ();
5253 if (spec != null ) return spec .getName ();
@@ -68,6 +69,7 @@ public String getElementDescription(@NotNull PsiElement o, @NotNull ElementDescr
6869 else if (o instanceof ErlangTypeDefinition ) return "type" ;
6970 else if (o instanceof ErlangAttribute ) return "attribute" ;
7071 else if (o instanceof ErlangQAtom ) return "atom" ;
72+ else if (o instanceof ErlangTypeRef ) return "type" ;
7173 }
7274 LOG .error ("Unexpected element " + o .getText () + ", class: " + o .getClass () + ", location: " + location .getClass ());
7375 return "<unknown>" ;
0 commit comments