adding highlighting styles over specified ranges

SyntaxEditor for WPF Forum

Posted 9 years ago by Andy Haines
Version: 10.1.0523
Avatar
I've got a language for which I have registered a DataflowTokenTaggerProvider and a CodeDocumentTaggerProvider<ParseErrorTagger>. What I would like to do is this: by default a specified classification type uses a particular highlighting style. When the data in the syntax editor document changes I want to specify a different highlighting style to use for that classification type over a specified text range. By reading the documentation I think this is possible but any concrete information about how to procede would be very helpful. Thanks.

Comments (2)

Posted 9 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hello,

The highlighting engine is not designed to allow different ranges to be highlighted differently from each other when they share the same classification type. An effective solution to the problem would be to change the classification type for the text ranges which have been modified.

The tagger will need to raise its TagsChanged event. That event specifies a range that needs updating. The event will trigger a callback to GetTags, at which point the tagger would have the opportunity to tag appropriately based on whether the document was modified.

You would need to register a separate highlighting style for the two classification types that pertain to this problem.

Please let us know if you have further questions.

[Modified at 08/09/2010 04:06 PM]


Actipro Software Support

Posted 9 years ago by Andy Haines
Avatar
Thank you!
The latest build of this product (v2019.1 build 0683) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.