Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » How can I save the AST generated code
How can I save the AST generated code [message #17759] Thu, 08 May 2003 11:16 Go to next message
Eclipse UserFriend
Originally posted by: wgyun.hotmail.com

Hi there,
I'm using AST to create java source from scratch, something like:
AST ast = new AST();
CompilationUnit unit = ast.newCompilationUnit();
PackageDeclaration packageDeclaration = ast.newPackageDeclaration
.....
But I don't know how to save this generated content, there seems no
relationship
between CompilationUnit and ICompilationUnit. Could anyone give me a hint?
I'd appreciate your help very much!
Thanks!
Re: How can I save the AST generated code [message #17763 is a reply to message #17759] Thu, 08 May 2003 11:15 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: adam_kiezun.ch.ibm.spam.protection.com

this question has been asked many, many times - search the archive eclipse.tools newgroup for
'serialize' and such

and look here
https://bugs.eclipse.org/bugs/show_bug.cgi?id=23152

a.
--
eclipse.org
Re: How can I save the AST generated code [message #17780 is a reply to message #17763] Thu, 08 May 2003 13:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wgyun.hotmail.com

Sorry, I did do a search in "eclipse.tools" and other groups before I posted
this message, but I couldn't find anything related with AST and
serialization.
When I looked into the link you gave me, it mentions postponing the fix to
3.0, is this true? If it is true, is there a workaround? I really appreciate
your help!

"Adam Kiezun" <adam_kiezun@ch.ibm.spam.protection.com> wrote in message
news:b9dsap$3t9$1@rogue.oti.com...
> this question has been asked many, many times - search the archive
eclipse.tools newgroup for
> 'serialize' and such
>
> and look here
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=23152
>
> a.
> --
> eclipse.org
>
>
Re: How can I save the AST generated code [message #17782 is a reply to message #17780] Thu, 08 May 2003 13:46 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: adam_kiezun.ch.ibm.spam.protection.com

the workaround is:

use the internal class ASTFlattener

or, better yet, for safety reasons (because it's internal) - copy it or mimic it
a.
--
eclipse.org
Re: How can I save the AST generated code [message #17785 is a reply to message #17780] Thu, 08 May 2003 13:47 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: adam_kiezun.ch.ibm.spam.protection.com

> When I looked into the link you gave me, it mentions postponing the fix to
> 3.0, is this true?

well, 2.1 is out of the door, so i guess 3.0 is the earliest

a.
--
eclipse.org
Re: How can I save the AST generated code [message #17787 is a reply to message #17782] Thu, 08 May 2003 14:33 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wgyun.hotmail.com

Since I saw the resolution is using ASTFlattener, I'm just hesitating to use
the internal api. Now I think I'll copy it to my code line.
Thanks a lot!

"Adam Kiezun" <adam_kiezun@ch.ibm.spam.protection.com> wrote in message
news:b9e55d$bgc$1@rogue.oti.com...
> the workaround is:
>
> use the internal class ASTFlattener
>
> or, better yet, for safety reasons (because it's internal) - copy it or
mimic it
> a.
> --
> eclipse.org
>
>
>
Re: How can I save the AST generated code [message #17794 is a reply to message #17787] Thu, 08 May 2003 15:51 Go to previous message
Eclipse UserFriend
Originally posted by: olivier_thomann.nospam.oti.com

On Thu, 8 May 2003 14:33:15 -0400, "Cindy Wen" <wgyun@hotmail.com>
wrote:
>Since I saw the resolution is using ASTFlattener, I'm just hesitating to use
>the internal api. Now I think I'll copy it to my code line.
>Thanks a lot!
Be careful that ASTFlattener is not preserving unicodes.
--
Olivier
Previous Topic:Resource bundle lookup?
Next Topic:JavaW problems
Goto Forum:
  


Current Time: Thu May 08 09:46:34 EDT 2025

Powered by FUDForum. Page generated in 0.09073 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top