Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Is there a Pretty Printer for JSDT DOM?
Is there a Pretty Printer for JSDT DOM? [message #500517] Thu, 26 November 2009 13:54 Go to next message
Jake  is currently offline Jake Friend
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 21:56 Go to previous messageGo to next message
David Goodenough is currently offline David GoodenoughFriend
Messages: 157
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 06:36 Go to previous messageGo to next message
Jake  is currently offline Jake Friend
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 11:16 Go to previous message
David Goodenough is currently offline David GoodenoughFriend
Messages: 157
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: Sat Apr 20 02:09:44 GMT 2024

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

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

Back to the top