Package Visitor

I’m trying to create custom rule that needs to visit the package.
Is it possible to visit the code in package rather than visit the compilation unit?
I try to set the nodesToVisit using Tree.Kind.PACKAGE, but the visitNode method is not triggered?

Hello,

Unfortunately, no. You can only visit from compilation units to compilation units. There is actually no way to get all the code present in the same package.

Hope this helps,
Michael

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.