problem with visitNewExpression ? Follow
I have a problem with the visitNewExpression method from the PsiRecursiveElementVisitor class.
The following snippet of code does not invoke a call to the visitNewExpression
I would have like to get a call for the new RequiredTextField.
Is this case calling some of the other "visit" methods ?
Please sign in to leave a comment.
Make sure you are calling "super.visitXXX" somewhere in every visitXXX method you implement. If you don't, traversal will not occur into the children of the visited object. Per the example, I'm betting you implemented either visitReferenceExpression or visitMethodCall and didn't call super in them. It's easy to overlook, and results in just this sort of problem.
Thanks. That fixed the problem. Could have been nice if that was added to javadoc.
Could have been nice if that was added to javadoc.
After you write your first five hundred or so PsiVisitors, it's all pretty easy to remember.
Oh well - I only need about 499 then... :)
BTW: Cool plugins you have created - you must have spent more than a few hours I guess ;)