How to create a custom highlighting "decoration"/"adornment"

At the moment I've implemented a custom highlighting using the following code.

[ClassificationType(ClassificationTypeNames = MyHighlightingAttributeIds.HIGHLIGHTING_ID)]
[Order(After = "Formal Language Priority", Before = "Natural Language Priority")]
[Export(typeof(EditorFormatDefinition))]
[Name(MyHighlightingAttributeIds.HIGHLIGHTING_ID)]
[DisplayName(MyHighlightingAttributeIds.HIGHLIGHTING_ID)]
[UserVisible(true)]
internal class MyHighlightingClassificationDefinition : ClassificationFormatDefinition
{
    public MyHighlightingClassificationDefinition()
    {
        DisplayName = MyHighlightingAttributeIds.HIGHLIGHTING_ID;
        ForegroundColor = Colors.DeepPink;
    }

    [Export, Name(MyHighlightingAttributeIds.HIGHLIGHTING_ID), BaseDefinition("formal language")]
    internal ClassificationTypeDefinition ClassificationTypeDefinition;
}

It produces these highlightings:


(I've copied and modified Controlflow's custom HeapView highlightings.)

My question: How can I "decorate"/"adorn" it manually? (I want to draw an exclamation mark next to the text range.)

 

Please sign in to leave a comment.