Hi Rajeeva, i've done something similar for Twig [1] some time ago.
You need to implement a custom Jflex Lexer/Parser for your language (based on the one from PDT) and then contribute a DocumentModel [2]. Afaik there is no cleaner way to write an HTML editor with a nested templating language based on the existing WTP HTML editor. Hope this helps, -robert [1] https://github.com/pulse00/Twig-Eclipse-Plugin/tree/master/com.dubture.twig.core/Resources/parserTools [2] https://github.com/pulse00/Twig-Eclipse-Plugin/tree/master/com.dubture.twig.core/src/com/dubture/twig/core/documentModel On Mon, Apr 22, 2013 at 12:37 PM, Jacek Pospychała < [email protected]> wrote: > hi Rajeeva, > > PDT editor builds heavily on top of structured source editing API > (SSE, found in org.eclipse.wst.sse.ui plugin), which in turn builds on > top of Eclipse Text editor API. > HTML editor (in org.eclipse.wst.html.ui plugin) and Javascript editor > (in org.eclipse.jsdt.ui plugin) are also built on top of SSE API so > that in similar to PDT way, they implement similar mechanisms for HTML > and JS languages. > SSE uses document partitioning, so that each partition of edited file > can be handled by different plugins providing specific > highlighting/formatting/etc. for different languages > > That's how it works from fairly high level. I'd recommend you look up > more about how SSE works. > > Jacek > > > > On Mon, Apr 22, 2013 at 11:46 AM, Rajeeva Uthayasangar > <[email protected]> wrote: > > Hi All, > > I'm developing a Eclipse IDE for Jaggery [1]. So I'm trying to customize > > the PDT to my purpose. In PDT how the syntax coloring id done for > keywords, > > comments etc. > > > > I need to have support of HTML and Javascript in my Jaggery editor. So if > > some one explains how the HTML and Javascript are integrated with PHP > > Editor it would help me lot? > > > > [1]. http://jaggeryjs.org/ > > > > Thanks. > > Rajeeva. > > > > _______________________________________________ > > pdt-dev mailing list > > [email protected] > > https://dev.eclipse.org/mailman/listinfo/pdt-dev > > > _______________________________________________ > pdt-dev mailing list > [email protected] > https://dev.eclipse.org/mailman/listinfo/pdt-dev > -- phone +43 676 64 57 240 Zieglergasse 65/6 1070 Vienna Austria twitter.com/pulse00 github.com/pulse00
_______________________________________________ pdt-dev mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/pdt-dev
