【发布时间】:2018-10-14 11:11:13
【问题描述】:
我通过 ASTRewrite 对 AST 进行了一些更改,并通过 Change.perform 应用了更改,C 文件已正确更新为新更改(插入新节点),但在调试模式下,AST 对象感觉不到这些更改
ast.getRawSignature(); // C file code as text
ASTRewrite rewriter = ASTRewrite.create(ast);
addNewNode(node, ast, rewriter); //Inserting some node
Change c = rewriter.rewriteAST();
try {
c.perform(new NullProgressMonitor());
} catch (CoreException e) {
e.printStackTrace();
}
/**WHAT I WANT TO FLUSH THE AST HERE TO FEEL THE CHANGES**/
ast.getRawSignature(); //it still the same C old code and the C file already updated
我需要刷新 AST 以感受 AST 对象本身的变化,我该如何实现?
【问题讨论】:
标签: eclipse-cdt abstract-syntax-tree flush