. I want ...
# intellij-plugins
b
. I want these . vv vvv someFunctionName(“valueOne”,“ValueTwo”)
m
PsiMethod
is a declaration, while
someFunctionName(“valueOne”,“ValueTwo”)
is
PsiMethodCallExpression
b
ahhh okay, makes sense, if there a way to get a PsiMethodCallExpression from a PsiMethod reference?
actually got it!
Thanks for the help 🙂
m
Nope, this makes no sense. There are n expressions calling this method which can be found with ReferencesSearch, but that's not what you're looking for
b
yeah seems like I need something else here 🤔
r
You can traverse the entire tree with a visitor and match directly on the reference or call expression
Or use findDescendants if you are in some node that is a root of what you are looking for