As long as you have an IASTTranslationUnit you can create an ASTRewrite which should be quite safe.
Creating a new file can be done with a CreateFileChange. There you either already need to know the content or you can create it without any content
and then use the ASTRewrite on it.
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx]
On Behalf Of Krishna Narasimhan
Sent: Mittwoch, 13. August 2014 15:51
To: Alena Laskavaia; CDT General developers list.
Subject: Re: [cdt-dev] Getting ASTs of multiple files and creating new files
Actually this is for a different project too.
So basically there must be a way to obtain other IFile objects in the Workspace using the ResourcePlugin.
My question is , is it possible to rewrite them safely?
And can we write a translation unit into a newly created file in the workspace?
On Wed, Aug 13, 2014 at 3:43 PM, Alena Laskavaia <elaskavaia.cdt@xxxxxxxxx> wrote:
I think we just talked about in regards to AST diff. I am not sure it has any advantages vs doing text merge, there is no support for it in CDT. That would be very difficult task (and possibly computationally expensive)
Hello all,
I wish to look at two versions of files using Eclipse CDT and possibly merge them. This would involve being able to analyse ASTs of two files and also merging them and creating a new file. Does CDT have support for these. If not,
are there work arounds?
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cdt-dev
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cdt-dev
--
-----------------------------------------------------
I dare do all that may become a man; Who dares do more, is none - Macbeth, twelfh night!
Regards
Krishna
|