Posted 9 years ago by Arie Osherov - Cellebrite
Avatar
Hi.

I'm writing a debugger using the syntax editor. I'm trying to implement break point mechanism. I've read some hints that such a mechanism is already prepared. Is it so?
If not what would be the best way to tackle the issue?

Thanks,

Shlomi

Comments (8)

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

We don't yet have direct support for indicators, it's still on the TODO list. However we do have all the core extensibility features in place for you to implement them.

You would need to do two things:

1) Build a tagger that returns IClassificationTag's over the breakpoint ranges. You can assign a Breakpoint classification type for those ranges and associate that with an IHighlightingStyle that renders the background in red. That will highlight the text correctly.

2) Add a custom editor view margin (see QuickStarts for samples) that will render the breakpoint "dot" on lines that have breakpoints. You can add mouse support for setting/clearing breakpoints there too.


Actipro Software Support

Posted 8 years ago by Nassim Farhat
Avatar
Hello,

I was simply wondering if you had had the time to add the breakpoint onto your feature list?
If so, please let me know.

Regards,
Nassim
Posted 8 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Nassim,

While we haven't added it natively yet, we did make a QuickStart here that we could send you that shows how you could manually add breakpoints using tags/adornments similar to what was described above, all with our existing object model. Please email our support address if you'd like that.


Actipro Software Support

Posted 8 years ago by Nassim Farhat
Avatar
thank you... will contact support
Posted 8 years ago by Nassim Farhat
Avatar
Hello,

So i got a hold of your breakpoint sample and I added a yellow arrow glyph to it.

My breakpoint Tag declares the following in it's constructor:
        static BreakpointTag() {
            // Ensure the classification type is registered
            SolidColorBrush brush = new SolidColorBrush(Color.FromArgb(0xFF, 0xAB, 0x61, 0x6B));
            AmbientHighlightingStyleRegistry.Instance.Register(breakpointClassificationType, new HighlightingStyle(Brushes.White, brush));
        }
and my yellowArrow tag declares the following (if you re wondering i applied a yellow brush color to simulate the yellow background):
        static YellowArrowTag()
        {
            // Ensure the classification type is registered
            SolidColorBrush brush = new SolidColorBrush(Color.FromArgb(0xFF, 0xFF, 0xFE, 0x4C));
            AmbientHighlightingStyleRegistry.Instance.Register(yellowArrowRightClassificationType, new HighlightingStyle(Brushes.Black, brush));
            AmbientHighlightingStyleRegistry.Instance.Register(yellowArrowDocumentEndClassificationType, new HighlightingStyle(Brushes.Black, brush));
        }
Now my issue happens when both tags end up on the same line, the breakpoint and the yellowarrow together.
I see that the yellow arrow picture is superimposed on the breakpoint picture (that's fine), but for some reason the line's background highlighting is always RED when it should be YELLOW since the breakpoint was hit. Do you know how i can give priority to the yellow background tag and not the breakpoint's red background when both tags are superimposed on the same line?

Nassim
Posted 8 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Nassim,

Did you try flipping the order the tagger providers are added to your language?


Actipro Software Support

Posted 8 years ago by Nassim Farhat
Avatar
Well yes, actually the yellowArrow tag is added much later since i perform a step to next line action and when i get to the breakpoint tag and I add my yellow arrow tag my background line color remains red but my arrow is rendered correctly by the glypth drawer method.

Maybe it has something to do with the fact that a line can not have more than 1 tagger?

Any Idea what might be causing this?

I can always pass you my demo project but where can i attach it?

regards
Nassim
Posted 8 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Nassim,

Each ITagger implements IOrderable. So you can override the tagger's Orderings property as needed. You could tell your yellow tagger to come before the breakpoint tagger (I think that's the order but if not try flipping the Before to After). Just refer to the breakpoint tagger's key in your Ordering you create.

The ClassificationLayered QuickStart shows an example of using Orderings.


Actipro Software Support

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.