Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] Modifying the AST on the fly

Cool. Thanks, Markus. This has been on our wish list for many years. It'll be exciting to get something like this working.
 
Cheers,
Doug Schaefer
Engineering Manager, Wind River Systems
and Eclipse CDT Project Lead
 


From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Schorn, Markus
Sent: Friday, January 04, 2008 7:27 AM
To: CDT General developers list.
Subject: RE: [cdt-dev] Modifying the AST on the fly

Hi,
I have created https://bugs.eclipse.org/bugs/show_bug.cgi?id=214334, which proposes basic infrastructure for code-modifications based on AST. In a couple of months this should give you
a more elagant option for modifying code.
Markus.


From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Sheldon Dsouza
Sent: Thursday, January 03, 2008 5:35 PM
To: CDT General developers list.
Subject: Re: [cdt-dev] Modifying the AST on the fly
Importance: Low

I figured out a way to do it, thanks anyways. The solution was simple i got the translation unit from the editor working copy, and then added my new code into the IBuffer obtained from translation unit.

Regards,
Sheldon

On Jan 3, 2008 2:08 PM, Sheldon Dsouza <sheldond@xxxxxxxxx> wrote:
Since there is no AST writer, is there a way i can get the ITranslationUnit for a particular C source file and then append my contents to IBuffer got from the translationunit.

Regards,
Sheldon


On Dec 28, 2007 8:46 PM, Chris Recoskie <recoskie@xxxxxxxxxx> wrote:
Currently we don't have an AST writer.

===========================

Chris Recoskie
Team Lead, IBM CDT Team
IBM Toronto
http://www.eclipse.org/cdt




            "Sheldon Dsouza"
            <sheldond@gmail.c
            om>                                                        To
            Sent by:                  "CDT General developers list."
            cdt-dev-bounces@e         <cdt-dev@xxxxxxxxxxx>
            clipse.org                                                 cc

                                                                  Subject
            12/24/2007 05:09          [cdt-dev] Modifying the AST on the
            AM                        fly


            Please respond to
              "CDT General
            developers list."
            <cdt-dev@eclipse.
                  org>






Hi,


       I am working on some form of code generation where i have to
generate new method definitions that have to be added to the C source file,
on some action. Is there a way to directly add code snippets into the AST
and then update the source file, or do i have to use the IDocument approach
for the source file to do perform the above functionality.

Regards,
Sheldon _______________________________________________
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



Back to the top