[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [pdt-dev] Customizing the PDT for Jaggery

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 <jacek.pospychala@xxxxxxxxx> 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
<u3rajee@xxxxxxxxx> 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
> 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



--
phone +43 676 64 57 240

Zieglergasse 65/6
1070 Vienna
Austria

twitter.com/pulse00
github.com/pulse00