Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tracecompass-dev] Selection-based WeightedTreeView

Greetings from France,


I'd like to seek your advice on the direction I should take for a (I hope!) simple problem I have.

My background is not really in Java development (so please bear with me), however I already managed to implement some analyses/views using Trace Compass and I'd like to add a few more.


My current goal is to create a view providing an interactive Pie Chart which updates itself based on the selection.

Looking at the existing codebase, I believe the WeightedTreeView(er) answers most of my requirements, and I was thinking of making an analysis implementing IWeightedTreeProvider to format and feed the required data to the view.


I however have two issues:


1) WeightedTreeView as it is provides a global pie chart presenting data from the whole trace. I need to have it to trigger a refresh on a range selection.

I was thinking of making a new WeightedTreeViewer class, and overriding the updateElements method. But doing this doesn't really seem possible without also modifying the WeightedTreeView class, and maybe a few others.


Is there an easier way to achieve this that I don't see? The way things look, I see two options:

    - Modify WeightedTreeView/Viewer (and classes using them) to accept a template, so behaviour can be overridden.

    - Implement my own view, potentially reusing code from the existing classes.


2) When implementing a IWeightedTreeProvider so it can be used by the WeightedTreeView, the CallStackAanalysisListener adds the Callstack/FlameGraph views which are not really interesting to my use case. I've tried to see if I could de-register an output to an analysis, however it doesn't look like this API exists.

Here, except renaming the interface to avoid the automatic output registration, I don't really see how I could do this.


Both of these issues says to me that maybe the handy-dandy WeightedTreeView is not completely suited to my use case, and maybe there is another path for me to take.

What advice could those familiar with those interfaces give me?


Thanks for your help!


Denis.




Back to the top