To determine if the highlighting should be dimmed or not, it needs to find out the conditional context this line is in. If I can write a method that returns a list of pairs as in :
Then, I could quickly determine that the directive DebugXYZ is active but the directive Debug is not, therefore I should return a dimmed attribute.
That would do it.
If I could subclass TSynCustomCodeFoldBlock and add a text property called DirectiveName then I should be home free.
But I'm a bit stumped. I know I can subclass TSynCustomCodeFoldBlock.I also know I can override override the GetRangeClass in TSynCustomFoldHighlighter to get replace TSynCustomHighlighterRange with my descendant.
Where I'm stumped is that I can't figure out how subclassing TSynCustomHighlighterRange would help. There doesn't seem to be a way to tell this class to use my subclass of TSynCustomCodeFoldBlock. What am I missing?