Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Is there a Pretty Printer for JSDT DOM?
Is there a Pretty Printer for JSDT DOM? [message #500517] Thu, 26 November 2009 08:54 Go to next message
Jake  is currently offline Jake
Messages: 17
Registered: July 2009
Junior Member
Hi,

I'm currently using the core JSDT DOM API's for the purposes of code generation for a school project. While JSDT's ASTNode.toString is able to give us functional code, it's also rather ugly, and I'm wondering if anyone was aware of a pretty printer that could be used instead.

I'd appreciate any guidance anyone can offer. Thanks!

Jake
Re: Is there a Pretty Printer for JSDT DOM? [message #500593 is a reply to message #500517] Thu, 26 November 2009 16:56 Go to previous messageGo to next message
David Goodenough is currently offline David Goodenough
Messages: 155
Registered: July 2009
Senior Member
Jake wrote:

> Hi,
>
> I'm currently using the core JSDT DOM API's for the purposes of code
> generation for a school project. While JSDT's ASTNode.toString is able to
> give us functional code, it's also rather ugly, and I'm wondering if
> anyone was aware of a pretty printer that could be used instead.
>
> I'd appreciate any guidance anyone can offer. Thanks!
>
> Jake

There are two I know of. The first is the ASTView plugin, and the second
is an annotation in project Lombok (projectlombok.org).

David
Re: Is there a Pretty Printer for JSDT DOM? [message #500610 is a reply to message #500593] Fri, 27 November 2009 01:36 Go to previous messageGo to next message
Jake  is currently offline Jake
Messages: 17
Registered: July 2009
Junior Member
Hi David,

Thanks for the quick reply! Unfortunately, I think ASTView will not be appropriate for me, as I'd like to get plaintext output, and avoid Eclipse runtime dependencies.

As for Lombok, I was wondering if you could point me to more information on this, as I wasn't able to find much about how to use it for pretty printing.

Please let me know. Thanks,

Jake
Re: Is there a Pretty Printer for JSDT DOM? [message #500823 is a reply to message #500610] Sun, 29 November 2009 06:16 Go to previous message
David Goodenough is currently offline David Goodenough
Messages: 155
Registered: July 2009
Senior Member
Jake wrote:

> Hi David,
>
> Thanks for the quick reply! Unfortunately, I think ASTView will not be
> appropriate for me, as I'd like to get plaintext output, and avoid Eclipse
> runtime dependencies.
>
> As for Lombok, I was wondering if you could point me to more information
> on this, as I wasn't able to find much about how to use it for pretty
> printing.
>
> Please let me know. Thanks,
>
> Jake

There is an annotation (PrintAST) which will format the AST to file.

David
Previous Topic:What are Smoke Tests ?
Next Topic:wsdl:service and port name changed by eclipse
Goto Forum:
  


Current Time: Fri Aug 29 12:32:59 EDT 2014

Powered by FUDForum. Page generated in 0.03065 seconds