JSP parsing using PMD -


I am creating a custom PMD rule for JSP Parsing. I need to get to ASTCompilationUnit and get its end line number. I am using the following code:

  Public class MyCustomRule AbstractJspRule {// @Override extends public object travel (ASTCompilationUnit node, object data) {logger.log (Level.INFO , "*** JSP ***" + node. Gate Endline ()); Inline capacitance unit end line; Return super Visits (node, data); }  

When implementing this rule, PMD is ignoring this and is not going to ASTCompilationUnit node, though it is working on replacing ASTCompilationUnit with ASTContent. But my requirement is to get the finish line of AST's compilation pair because it is the top node of AST. Please help!

The generated AST is:

   


Comments