|
Re: Extending the HTML Editor [message #676129 is a reply to message #676047] |
Thu, 02 June 2011 22:23 |
Robert Gruendler Messages: 66 Registered: June 2011 |
Member |
|
|
I've found some more info about this topic, apperently there's no way to hook into the tokenizing process, which means one would re-implement the whole thing.
eclipse.org/forums/index.php?t=msg&goto=228286&
This post is quite old though, so i still have some slight hope that the semanticHighlighting extension could be used for that purpose.
The only project i could find which does something like this based on WTP tools is the smartypdt plugin, and it also implements a custom tokenizer using the jflex library:
code.google.com/p/smartypdt/source/browse/trunk/org.eclipse.php.smarty.core/src/org/eclipse/php/smarty/internal/core/documentModel/parser/SmartyTokenizer.java
[Updated on: Thu, 02 June 2011 22:24] Report message to a moderator
|
|
|
Re: Extending the HTML Editor [message #677216 is a reply to message #676047] |
Tue, 07 June 2011 20:42 |
|
On 6/2/2011 11:50 AM, Robert Gruendler wrote:
> My question now is: To add syntax-highlighting for a templating engine
> which adds non-xml structures to the document, do i need to specify such
> a .jflex
> grammar and generate the corresponding tokenizer from this "jflex" library?
>
> Is there probably a simpler solution for this problem? I've found the
> org.eclipse.wst.sse.ui.semanticHighlighting extension point, but i think
> this works only for language constructs already known by WTP.
There's no requirement that you use JFlex, we only did so because it's
well documented and using a generator produces faster lexers. But
you're going to have to accept that supporting a different syntax means
using a different grammar, even if it starts with one we already provide.
--
Nitin Dahyabhai
Eclipse WTP Source Editing and JSDT
IBM Rational
_
Nitin Dahyabhai
Eclipse Web Tools Platform
|
|
|
|
Powered by
FUDForum. Page generated in 0.03817 seconds