What's the best way to manage the unclosed multiline comment

Questions on using RSyntaxTextArea should go here.

Moderator: robert

What's the best way to manage the unclosed multiline comment

Postby Guillaume » Thu Jan 06, 2011 11:25 am

Hello,

I wish specified a specific color when the multi line comment is not closed, what is the best way to do that?

Thank

Good year 2011
Guillaume
 
Posts: 7
Joined: Fri Dec 10, 2010 2:16 pm

Re: What's the best way to manage the unclosed multiline com

Postby robert » Thu Jan 06, 2011 2:03 pm

Hi Guillaume,

This is unfortunately not supported in RSTA. I'd need to declare a new token type, and TokenMakers would need to be modified to colorize with it, for this to happen. Please add a Feature Request on the SourceForge page if you'd like to see this added.
User avatar
robert
 
Posts: 639
Joined: Sat May 10, 2008 5:16 pm

Re: What's the best way to manage the unclosed multiline com

Postby robert » Fri Jan 07, 2011 1:05 pm

On closer inspection, this would be a non-trivial modification to how RSTA tokenizes a document. For performance reasons, RSTA tokenizes a document on a per-line basis. This also simplifies the tokenizing code, and saves lots of memory over say, a JEditorPane approach. A side-effect of this is that it makes it very hard for RSTA to determine certain things while tokenizing, such as if a particular multi-line comment is ever closed. Unfortunately, for this reason, it's pretty unlikely you'll see this feature without a rewrite of the tokenizing code.
User avatar
robert
 
Posts: 639
Joined: Sat May 10, 2008 5:16 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 1 guest