Skip to content

Commit

Permalink
feat(GoPsiContextVariableProvider): map related types to text #89
Browse files Browse the repository at this point in the history
Update the GoPsiContextVariableProvider to map related types to their text representation. This change affects both GoFunctionOrMethodDeclaration and GoFile cases.
  • Loading branch information
phodal committed Sep 14, 2024
1 parent 33216d7 commit cce91ed
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class GoPsiContextVariableProvider : PsiContextVariableProvider {
PsiContextVariable.RELATED_CLASSES -> {
when (underTestElement) {
is GoFunctionOrMethodDeclaration -> {
GoPsiUtil.findRelatedTypes(underTestElement)
GoPsiUtil.findRelatedTypes(underTestElement).map { it.text}
}

is GoFile -> {
Expand All @@ -65,7 +65,7 @@ class GoPsiContextVariableProvider : PsiContextVariableProvider {

(functions + methods).flatMap {
GoPsiUtil.findRelatedTypes(it)
}
}.map { it.text}
}

else -> emptyList()
Expand Down

0 comments on commit cce91ed

Please sign in to comment.