I resume a project for develop some new rules, and one of them is to know if there is an invocation method in a for statement.
So i get the ForStatementTree objet and check the object in the condition(), update() and initializer() functions.
Condition() and update() functions return a ListTree, so for my needs, i check if possible the children of each StatementTree (maybe a mistake, but i’m starting this project).
My problem is that all subclass of interface StatementTree are not in the package org.sonar.plugins.java.api but org.sonar.java.model.statement, so when i execute my rules i have the same problem as this topic : Custom Rule Plugin - CompilationUnitTreeImpl ClassCastException - #3 by jmcnally2020
So do you know how can i get and navigate in the tree which is in a condition or update of a For statement ?
Thanks fo any help,