adding highlighting styles over specified ranges

SyntaxEditor for WPF Forum

Posted 14 years ago by Andy Haines
Version: 10.1.0523
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 14 years ago by Actipro Software Support - Cleveland, OH, USA

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 14 years ago by Andy Haines
Thank you!
The latest build of this product (v24.1.2) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.