It worked. Thanks!
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx]
On Behalf Of Sergey Prigogin
Sent: Wednesday, January 29, 2014 10:03 AM
To: CDT General developers list.
Subject: Re: [cdt-dev] ASTRewrite and addComment
On Wed, Jan 29, 2014 at 9:55 AM, Ayupov, Andrey <andrey.ayupov@xxxxxxxxx> wrote:
Sergey,
As you mentioned in the bug report thread, I can create a comment note using a literal node in ASTRewrite.
It would be good enough if there was a simple way to generate a code string (that the code generator writes) from an IASTStatement. Then I could use that as a string for the literal node and it would exactly be what I need - commenting a statement refactoring.
The code corresponding to the node is returned by getRawSignature() method.
From:
cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx]
On Behalf Of Sergey Prigogin
Sent: Wednesday, November 27, 2013 12:16 PM
To: CDT General developers list.
Subject: Re: [cdt-dev] ASTRewrite and addComment
You are right, it is currently impossible to create a comment node using only public API. Feel free to create a feature request and add a method for that to INodeFactory and NodeFactory.
On Wed, Nov 27, 2013 at 11:57 AM, Ayupov, Andrey <andrey.ayupov@xxxxxxxxx> wrote:
Seems like the ASTRewriter has some support for comments (I believe adds only):
public void addComment(IASTNode node, IASTComment comment, CommentPosition pos)
However, I can’t find who can create an IASTComment implementing object for me. The ICPPNodeFactory does not have a creator method for that. Any clues?
Thanks and happy thanksgiving!
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev
|