[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [pdt-dev] Generate PHP code

i've found the "code template" mechanism provided by
org.eclipse.ui.editors.templates
extension - which works fine for creating classes from simple templates.

I guess The ASTRewriter can be used for more complex tasks. Thanks for the hint.


-robert

 

On Sun, Sep 18, 2011 at 1:03 PM, Roy Ganor <roy@xxxxxxxx> wrote:
Yep, I recommend using the ASTRewriter functionality.

See org.eclipse.php.core.tests.dom_ast.rewrite.ASTRewriteTests

Roy
-----Original Message-----
From: pdt-dev-bounces@xxxxxxxxxxx [mailto:pdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Robert Gruendler
Sent: Friday, September 16, 2011 1:57 PM
To: PDT Developers
Subject: [pdt-dev] Generate PHP code

Hi,

i'm wondering what's the best way to generate PHP code from within a PDT extension. Is it possible to manually create an AST and
"dump" it to a file somewhere?

Or should i simply use template files and fill them with variables?


cheers


-robert
_______________________________________________
pdt-dev mailing list
pdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/pdt-dev
_______________________________________________
pdt-dev mailing list
pdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/pdt-dev