CompilationUnit astCU = (CompilationUnit) this.parser.createAST(this.progressMonitor);
AST ast = astCU.getAST();
ASTRewrite rewrite = ASTRewrite.create(ast);
updateTypeName(cu, astCU, cu.getElementName(), newName, rewrite);
updatePackageStatement(astCU, destPackageName, rewrite, cu);
return rewrite.rewriteAST();
}
}
private void updatePackageStatement(CompilationUnit astCU, String[] pkgName, ASTRewrite rewriter, ICompilationUnit cu) throws JavaModelException {
boolean defaultPackage = pkgName.length == 0;
AST ast = astCU.getAST();