[antlr-interest] Add fields, getter, setter, ... into existing java file with antlr?

Angelo zerr angelo.zerr at gmail.com
Tue Jan 16 09:40:45 PST 2007


Hi David,
thank you a lot for your answer. I will see your links.
I don't want use Eclipse to modify java file, because I want manage any
files
like xml, javascript, php, ... files. So I'm searching generic way to update
a file.

Regards Angelo

2007/1/16, David Holroyd <dave at badgers-in-foil.co.uk>:
>
> On Tue, Jan 16, 2007 at 01:57:21PM +0100, Angelo zerr wrote:
> > I'm developping eclipse plugin Akrogen http://akrogen.sourceforge.net/which
> > generate code (Freemarker, XSL,...) .
> > Today I would like manage the update of a file with generated content
> (ex :
> > generate content for getter and add it
> > to the existing file java class).
> >
> > Is it possible to do that with antlr. If it's it possible, could you
> help
> > me, give me suggestion  (I'm new user with antlr).
>
> I've written an ANTLRv3-based tool to do this kind of thing with
> ActionScript, and might give you some ideas:
>
>   http://www.badgers-in-foil.co.uk/projects/metaas/
>
>
> I think that the JaxMeJS may do this for Java, to some extent (and it's
> parser is ANTLR-based) but I'm not sure how pretty the resulting code
> is, as I've never tried round-tripping with that lib, only straight code
> generation,
>
>   http://ws.apache.org/jaxme/js/index.html
>
> However, if you are modifying Java files, and doing it in Eclipse too, I
> suspect you'd be best off using the Eclipse JDT platform's inherent
> support
> for Java code manipulation (not that I know which API's you need to look
> at though ;)
>
>
> ta,
> dave
>
> --
> http://david.holroyd.me.uk/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070116/001b6288/attachment.html 


More information about the antlr-interest mailing list