|Re: [tracecompass-dev] Question about visualizing thread-related events in TC incubator|
I extended thread status data provider by some extent, but I was blocked by the way to use it:
Before this I was using default Control Flow Viewer to view my trace, if I want to define new visual element in the view, should I not only extend the ThreadStatusDataProvider but also extend the ControlFlowView, so as to create the expected features? If
so, is there other thing I should take care of when creating this new view module? (it would be nice if there's a referable example, such as the view of another trace or a document, which one would you suggest to have a look?)
I have this question because I look into the codes of ControlFlowView, its only constructor is taking the base presentation provider and default thread status data provider. So I think my provider cannot be used by the default one.
From: tracecompass-dev-bounces@xxxxxxxxxxx <tracecompass-dev-bounces@xxxxxxxxxxx> on behalf of tracecompass developer discussions <tracecompass-dev@xxxxxxxxxxx>
Sent: Thursday, May 7, 2020 8:56 PM
To: tracecompass developer discussions
Subject: Re: [tracecompass-dev] Question about visualizing thread-related events in TC incubator
The expected method to achieve this in the current framework would be to have you data provider (for Control Flow view: ThreadStatusDataProvider) implement IOutputAnnotationProvider.
The returned annotations would have a category, an entryId (representing the row, matching the model from fetchTree()), a time, and a style.
The style map should contain properties COLOR, SYMBOL_TYPE and HEIGHT. There are few built-in symbol types, like CIRCLE and SQUARE.
If you split your annotations into different categories you can turn them on or off independently in the view's "Show Markers" menu.
If you include those styles in the model returned by fetchStyle(), then you can have the user configure the color and height (and eventually, the symbol type) from the view's legend.
On Thu, May 7, 2020 at 1:28 PM tracecompass developer discussions <tracecompass-dev@xxxxxxxxxxx> wrote:
Back to the top