Re: XDocReport, IDE support (Was: Re: Anybody with deeper OSGi bundle can comment on freemarker.jar OSGification?)

Daniel Dekany <[email protected]> Tue, 4 Jun 2013 16:18:03 +0200
Newsgroups gmane.comp.web.freemarker.devel
Message-ID <[email protected]>
Tuesday, June 4, 2013, 11:59:20 AM, Angelo zerr wrote:

[sbip]
> Your explanation is what XDocReport preprocessing do.

Certainly its not *all* the same, because then it would not require
putting interpolations into fields.

> For Java, it's JDT plugins which manages the java parsing. It
> exists several project like XText and DLTK 
> which provides the capability to parse other language and build an AST.
> With XText you write a grammar and after it build an EMF (Eclipse
> Model Framework)  instance. It uses this EMF instance 
> to manage completion, syntax coloring, folding etc.
>
> DLTK is a project to manage dynamic  language like Javascript, Ruby
> etc. You must write a parser which builds a DLTK AST and after 
> you benefit with several features like code folding, debugging support with DBGP etc.
> To create this DLTK AST, you can :
>
> 1) create your own parser to create directly the DLTK AST.
> 2) create a parser which uses an existing parser to build a DLTK AST.
>
> In my case for Freemarker I have choosen the 2). The performance is
> less good than 1) but there are good performance and it avoids to maintain 2 FM parsing.

OK, let's consider 2) as the goal for now, and then we will see if it
a realistic goal with this JavaCC stuff we have. Yet, as plan B, is it
a standard approach that you have a special parser for the IDE, but
for the error markings you are using the production parser? Because if
the syntax coloring and outline and such errs in some edge cases (like
around the glitches in the production parser...), but still only marks
templates as error free that will not fail during parsing on the
server, that's maybe a good enough.

> Regards Angelo
>
> has taken JDT code to manage any dynamic language 

-- 
Thanks,
 Daniel Dekany


------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j