Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tracecompass-dev] Adding text to CallStackViewer event tooltippopup

Patrick
I have got this working, where overriding TimeGraphPresentationProvider.getEventHoverToolTipInfo(ITimeEvent) allows me to modify the popup text with additional strings.

I have modified the state system for my implementation by defining a new quark at the same level in the attribute tree as the 'CallStack" quark, where I use ITmfStateSystemBuilder.pushAttribute and ITmfStateSystemBuilder.popAttribute to maintain a stack of event names in parallel with the CallStack entries, so there is a 1:1 correspondence for quarks in the Event subtree and the CallStack subtree.

Looking at the StateSystem view, it looks loike my state system is correctly constructed.

I am having trouble accessing the quarks in the Event subtree.

I get the quark for the interval in getEventHoverToolTipInfo by calling event.getEntry().getQuark(). If I call getFullAttributePath for that quark I get Processes/1/1CallStack/3 which matches what I see in State SystemExplorer. I modify this path to Processes/1/1/Event/3 which should get me the corresponding quark for event name in the Event subtree, but when I call getQuarkRelative(callStackQuark, "../../Event/3") I get an AttributeNotFoundException. If I call getQuarks(callStackQuark, ".."), I get the immediate parent quark as expected. If I call getQuarks(callStackQuark, "../..") or getQuarks(callStackQuark, "../../*") I get an empty quark list when I should be getting at least one entry.

I'm apparently missing something again, but no idea what it is.

Dave
Inactive hide details for Patrick Tasse ---07/08/2016 11:14:27 AM---Hi, We could add a constructor to CallStackView that takes Patrick Tasse ---07/08/2016 11:14:27 AM---Hi, We could add a constructor to CallStackView that takes a presentation

From: Patrick Tasse <patrick.tasse@xxxxxxxxx>
To: tracecompass developer discussions <tracecompass-dev@xxxxxxxxxxx>
Date: 07/08/2016 11:14 AM
Subject: Re: [tracecompass-dev] Adding text to CallStackViewer event tooltip popup
Sent by: tracecompass-dev-bounces@xxxxxxxxxxx





Hi,

We could add a constructor to CallStackView that takes a presentation provider as parameter, but then you'd need to wait for next release to use it.

With the current release, you should try calling getTimeGraphViewer().setTimeGraphProvider(provider) from your CallStackView subclass's overloaded createPartControl() method. This should be done after calling super.createPartControl() because the base class will set it to the provider that was set in the constructor.
The provider should extend CallStackPresentationProvider, and you should call setCallStackView() on it.

Patrick


On Thu, Jul 7, 2016 at 6:03 PM, Alexandre Montplaisir <alexmonthy@xxxxxxxxxxxx> wrote:
    Hi Dave,

    Indeed, the CallStackView does not allow setting a custom presentation provider. It doesn't seem trivial since it is set as the first statement in the view's constructor:

        public CallStackView() {
            super(ID, new CallStackPresentationProvider());

    I tried adding a setter to set the presentation provider after the fact, but that caused all sorts of problems...

    Patrick, do you have any idea or suggestion?


    Cheers,
    Alexandre






    On 2016-07-05 01:40 PM, David Wootton wrote:

    Hi
    Is there any way to add additional text to the tooltip popup that appears
    when I hover over an event in the call stack view? I'd like to show text
    that provides additional detail about the event. or the location in source
    code this represents.

      I've looked at source code and it appears this is handled by a
    CallStackPresentationProvider object, where it doesn't look like there is
    any way to set a new provider.

    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
_______________________________________________
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