intellij idea plugin dev: Can I get a psiField from methodcallExpression

Answered

1、Is it possible to derive from callExpress that esClient is a field and not a local variable?

2、Can I get the PsiField type of esClient?

Thank you。

0
3 comments

I do the same thing  with 
1. get all Field in containingClass 
2. get the parameter List  on method 
3. use stack to push/pop variable  define in your method.
then you will get  the caller type !

1

See com.siyeh.ig.psiutils.MethodCallUtils#isMethodCallOnVariable

1

Thank you for your reply。 Yann Cebron

0

Please sign in to leave a comment.