We are currently investigating an issue where outgoing e-mails from our web site are not sending, and apologize for any problems this causes. Please contact us directly via e-mail if you require assistance in the meantime.

AdornmentManager or DecorationAdornmentManagerBase?

SyntaxEditor for WPF Forum

Posted 9 years ago by Mick George - Software Engineer, CNC Software, Inc.
Version: 11.1.0542

We are developing an editor that includes a debugger very similar to the one in Visual Studio. Currently I am working on implementing debug stepping functionality and one of the items on my to do list is to highlight each lines text in the same way Visual Studio does while a user steps through a file.

I initially created a CurrentBreakLineAdornmentManager that implements AdornmentManagerBase<IEditorView> and it does work but there are some issues with it and because of this I am wondering if what I really need is a custom tag that implements DecorationAdornmentManagerBase<IEditorView, CustomTag>.

So my question is, what would be your recommended implementation based on the information I have given?

Comments (2)

Posted 9 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Mick,

If you are just looking to do a simple background highlight of text, you don't need to create your own adornment manager since if you just have a classification tagger in place, SyntaxEditor can take care of the highlighting for you.

I'd recommend creating a class that inherits CollectionTagger<IClassificationTag> and registering that on your language with a tagger provider like in our adornments samples. If you have the tags from that tagger return an IClassificationType that is associated with an IHighlightingStyle, it will render the text using that style (including background specified by the style).

Thus no adornments are needed for this scenario.

Actipro Software Support

Posted 9 years ago by Mick George - Software Engineer, CNC Software, Inc.
Thank you for the information.
The latest build of this product (v2019.1 build 0686) 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.