public static void doTreeAction(String f, AST t, String[] tokenNames) {
if ( t==null ) return;
if ( showTree ) {
CommonAST.setVerboseStringConversion(true, tokenNames);
ASTFactory factory = new ASTFactory();
AST r = factory.create(0,"AST ROOT");
r.setFirstChild(t);
final ASTFrame frame = new ASTFrame("Groovy AST", r);
frame.setVisible(true);
frame.addWindowListener(
new WindowAdapter() {