1616
1717package com .goide .codeInsight ;
1818
19- import com .goide .psi .GoExpression ;
2019import com .goide .psi .GoStatement ;
2120import com .goide .psi .GoType ;
21+ import com .goide .psi .GoTypeOwner ;
2222import com .intellij .lang .ExpressionTypeProvider ;
2323import com .intellij .openapi .util .text .StringUtil ;
2424import com .intellij .psi .PsiElement ;
2828
2929import java .util .List ;
3030
31- public class GoExpressionTypeProvider extends ExpressionTypeProvider <GoExpression > {
31+ public class GoExpressionTypeProvider extends ExpressionTypeProvider <GoTypeOwner > {
3232 @ NotNull
3333 @ Override
34- public String getInformationHint (@ NotNull GoExpression element ) {
34+ public String getInformationHint (@ NotNull GoTypeOwner element ) {
3535 GoType type = element .getGoType (null );
3636 return StringUtil .escapeXml (StringUtil .notNullize (type != null ? type .getText () : null , "<unknown>" ));
3737 }
@@ -44,14 +44,14 @@ public String getErrorHint() {
4444
4545 @ NotNull
4646 @ Override
47- public List <GoExpression > getExpressionsAt (@ NotNull PsiElement elementAt ) {
47+ public List <GoTypeOwner > getExpressionsAt (@ NotNull PsiElement elementAt ) {
4848 if (PsiTreeUtil .getParentOfType (elementAt , GoStatement .class ) == null ) {
4949 return ContainerUtil .emptyList ();
5050 }
51- List <GoExpression > expressions = ContainerUtil .newArrayList ();
51+ List <GoTypeOwner > expressions = ContainerUtil .newArrayList ();
5252 while (elementAt != null && !(elementAt instanceof GoStatement )) {
53- if (elementAt instanceof GoExpression ) {
54- expressions .add ((GoExpression )elementAt );
53+ if (elementAt instanceof GoTypeOwner ) {
54+ expressions .add ((GoTypeOwner )elementAt );
5555 }
5656 elementAt = elementAt .getParent ();
5757 }
0 commit comments