Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » StructuredDocument - requesting re-parse?
StructuredDocument - requesting re-parse? [message #685726] Sat, 18 June 2011 11:32 Go to next message
Robert Gruendler is currently offline Robert GruendlerFriend
Messages: 66
Registered: June 2011
Member
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 06:24 Go to previous message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

That would be judged by the IStructuredTextReParser on your IStructuredDocument. It decides how to handle incremental changes.

_
Nitin Dahyabhai
Eclipse Web Tools Platform
Previous Topic:"Real time" content assist
Next Topic:Indigo Java EE Developers
Goto Forum:
  


Current Time: Tue Apr 16 05:32:19 GMT 2024

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

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

Back to the top