Community
Participate
Working Groups
Build Identifier: M20100909-0800 The rewrite infrastructure scans each block that has been changed and finds the first and last edit in that block. It then inserts a pretty printing of the modified AST into the space between those edits. As a result, if a refactoring, for example inserts a statement at the beginning and end of a method all the code in the method between those statements, that was never actually touched by the refactoring, is pretty-printed. As a consequence the users code formatting is lost and macros expanded. This holds for any code block including that of a class. Reproducible: Always Steps to Reproduce: 1. Use the ASTRewrite class to insert a statement at the beginning and end of a method 2. Observe that the formatting of the code in the method is changed, and that macros are expanded.
I believe this is fixed now. Please reopen if you can provide a an example that still reproduces this problem.