Re: Anybody with deeper OSGi bundle can comment on freemarker.jar OSGification?
Angelo zerr <[email protected]> Mon, 3 Jun 2013 11:16:59 +0200
| Newsgroups | gmane.comp.web.freemarker.devel |
|---|---|
| Message-ID | <CAKLdLg9njGNFTAsivbhB-d41c+Rth0f3+oB_5+aZArxc84mbew@mail.gmail.com> |
Hi Daniel > Sure. You should provide a project description, less than 250 >characters. Ok I will send you that. >Any ideas that would make FreeMarker a better fit for these kind of >templates that you enter right into Word/LO? docx/odt are a zip which contains several XML entries (ex: for docx word/document.xml, for odt content.xml) XDocReport unzip docx/odt and load some XML entries ( word/document.xml, for odt content.xml) with Freemarker. So we have a Template instance for some XML entries. When report must be generated, XDocReport uses Freemarker to merge XML entries with Java context and create a new zip with XML entries merged. Freemarker works great. The only thing that I don't like is our extractor fields feature (it extract Freemarker fields name from docx).See method extractVariables https://code.google.com/p/xdocreport/source/browse/template/fr.opensagres.xdocreport.template.freemarker/src/main/java/fr/opensagres/xdocreport/template/freemarker/FreemarkerTemplateEngine.java I find this code is awfull: if ( DOLLAR_VARIABLE.equals( templateElement.getClass().getSimpleName() ) ) > But it's on the Central Maven Repository for a long time. Or what do >you mean? yes you are right, but it doesn't support OSGi. > Yes, better tooling would mean a lot to FreeMarker. cool. > Was that also a problem with FM 3? Jonathan Revusky told me that it's possible to manage tolerant parser with FreeCC, but he has gaven Freemarker. I have not time to study FreeCC and I would like find people who are interested to help me to develop DLTK Freemarker. An other idea that I had had, is to manage Freemarker with CodeMirro( Javascript editor which manages any mode). I have works a lot with CodeMirror for completion and syntax error. For instance you can find sample with Velocity http://codemirror-java.opensagres.cloudbees.net/velocity.html the syntax error is managed on server side. We could do the same thing with Freemarker and better manage debugging feature. Regards Angelo 2013/6/3 Daniel Dekany <[email protected]> > Monday, June 3, 2013, 1:21:04 AM, Angelo zerr wrote: > > > Hi everybody, > > > > @Daniel : for OSGi topic, it seems your bnd is good. We use > > Freemarker with XDocReport which is Java reporting tool (you design > > your report with MS Word or OpenOffice and you use > > Velocity/Freemarker syntax to replace simple, list value) and > > generate docx or odt report (and convert it with PDF or XHTML) > > (Daniel, you can add XDocReport to the Powered By if you are agree, > > thank's!). > > Sure. You should provide a project description, less than 250 > characters. > > Any ideas that would make FreeMarker a better fit for these kind of > templates that you enter right into Word/LO? > > > We have an Eclipse RCP/RAP demo (which works on OSGi > > context) and in this demo we use the com.springsource.freemarker > > bundles and the MANIFEST.MF looks like your bnd. > > > > It's out of scope of this post, but I think it should really cool if > > Freemarker could be hosted on the central maven repository (like > > springsource have done). Many project uses Maven (we use it in > > XDocReport) and I could simply switch to the "official" Freemarker > > dependency. > > But it's on the Central Maven Repository for a long time. Or what do > you mean? > > <dependency> > <groupId>org.freemarker</groupId> > <artifactId>freemarker</artifactId> > <version>...</version> > </dependency> > > > @Debugging feature : I think today Freemarker is very mature and > > stable, but I think tooling about Freemarker misses. > > Yes, better tooling would mean a lot to FreeMarker. I was rather > unhappy about all that happened with your work on the DLTK plugin due > to the cancelling of FM3. > > > It exists a JBoss Freemarker plugins but I think we can do better > > than this plugin like managing debugger, preview, etc. I had started > > this work with Eclipse DLTK at > > > http://sourceforge.net/p/freemarker/code/HEAD/tree/sandbox/org.eclipse.dltk.freemarker/ > > You can see doc at > > > http://sourceforge.net/p/freemarker/code/HEAD/tree/sandbox/org.eclipse.dltk.freemarker/docs/ > > and for debug I have used the Debugger Freemarker to manage DBGP > protocol. > > > > But I have gaven my work because of the Freemarker parser which is > > not tolerant (it crashes as soon as it finds an error). With editor > > context, parser must be tolerant (to build an AST even if there are > errors). > > Was that also a problem with FM 3? Anyway, if you still want to work > on that plugin, we could revive this topic, and then I could do > something about it. Something that this time makes into a release. > > > IMHO, I think Freemarker should be improved for tools support like : > > > > * manage tolerant parser. > > * improve debugger (like DBGP debugger). > > > > Regards Angelo > > -- > Thanks, > Daniel Dekany > > ------------------------------------------------------------------------------ Get 100% visibility into Java/.NET code with AppDynamics Lite It's a free troubleshooting tool designed for production Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://p.sf.net/sfu/appdyn_d2d_ap2 _______________________________________________ FreeMarker-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/freemarker-devel