Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tracecompass-dev] Interval colors in CallStackView

Hi Dave,

Another solution you might want to consider is to draw borders around the time events, or some other visual help.

You could do something like this in the overridden presentation provider:

    @Override
    public void postDrawEvent(ITimeEvent event, Rectangle bounds, GC gc) {
        super.postDrawEvent(event, bounds, gc);
        gc.setForeground(gc.getDevice().getSystemColor(SWT.COLOR_BLACK));
        gc.drawRectangle(bounds.x - 1, bounds.y, bounds.width + 1, bounds.height - 1);
    }

The -1 and +1 allows for the state color to be visible when the state is only 1 or 2 pixels wide, but it makes the even look wider than it actually is. You could also experiment with transparency using gc.setAlpha(), or having some kind of stateful presentation provider that only draws a separator line when the previous drawn event is adjacent.

Patrick



On Thu, Mar 9, 2017 at 6:54 PM, Matthew Khouzam <matthew.khouzam@xxxxxxxxxxxx> wrote:

Hi Dave,


Excellent question. Genevieve is working on it as we speak. If you need something sooner, and you don't mind getting your hands covered in Java, take a look at CallStackPresentationProvider#getState.


I would extract that code somewhere safe like the symbol providers or somewhere else, so the other charts like flame graph can use it too.


This is very interesting for me personally. If you have any improvements to share, I will gladly review it. When I get some spare time I might do something similar. 😉


Cheers,

Matthew


From: tracecompass-dev-bounces@eclipse.org <tracecompass-dev-bounces@eclipse.org> on behalf of David Wootton <dwootton@xxxxxxxxxx>
Sent: Thursday, March 9, 2017 5:45:08 PM
To: Trace Compass Developer Discussions
Subject: [tracecompass-dev] Interval colors in CallStackView
 

Hi
Is there any way to control colors for intervals in the CallStackView? I have a case where I am generating intervals where the end time for one interval on a thread exactly matches the start time for the next interval on the same thread. These are correctly displayed on the timeline, but it is difficult to find the boundary between the two intervals since they both have the same color.

Is there some way to control the color of the intervals from within a class which extends CallStackView, or at least get intervals to use alternating colors?

Thanks

Dave


_______________________________________________
tracecompass-dev mailing list
tracecompass-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tracecompass-dev



Back to the top