Eclipse JDT ASTRewrite修改源码后保存

ICompilationUnit copy = ICompilationUnit.getWorkingCopy(null);
            copy.reconcile(0, false, copy.getOwner(), null);
            copy.commit(false, null);
            copy.discardWorkingCopy();