Skip to main content



      Home
Home » Language IDEs » ServerTools (WTP) » StructuredDocument - requesting re-parse?
StructuredDocument - requesting re-parse? [message #685726] Sat, 18 June 2011 07:32 Go to next message
Eclipse UserFriend
Hi,

i'm extending the XMLSourceParser to add syntax highlighting for a templating language.

So far syntax highlighting is working, however with some strange quirks which i couldn't find a solution for.

The highlighting works fine if if past a single line of templating code into the editor, ie

 <div> {{ foo }} </div>  


the brackets are correctly tokenized into open and close regions, and foo is correctly tokenized and highlighted as a keyword.

When i type the code manually (character by character), the SourceParser.parseNodes() method is not called anymore, as soon as i enter the Templating content - after "{{".

If i cut the line and paste it again into the editor, parseNodes() is called and highlighting works as expexted.

So i'm wondering how does the StructuredEditor determine if it should call parseNodes() on my SourceParser (which extends XMLSourceParser) ?


Any hints greatly appreciated!


-robert

Re: StructuredDocument - requesting re-parse? [message #686380 is a reply to message #685726] Wed, 22 June 2011 02:24 Go to previous message
Eclipse UserFriend
That would be judged by the IStructuredTextReParser on your IStructuredDocument. It decides how to handle incremental changes.
Previous Topic:"Real time" content assist
Next Topic:Indigo Java EE Developers
Goto Forum:
  


Current Time: Fri Jul 11 20:46:54 EDT 2025

Powered by FUDForum. Page generated in 0.03706 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top