[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [linuxtools-dev] TMF question: ITmfEventsFilterProvider
|
Hi Xavier,
I didn't think it would be even possible so your code is not crappy but rather ingenious ;)
In 2.0 this is being refactored because the listener/provider solution wasn't working well: if your listener was created after the trace was already opened, it would be too late to receive the TmfTraceOpenedSignal so it couldn't register itself as a listener to the provider.
So in lttng-kepler branch, instead we are using the TMF signal manager. Your listener just has to extend TmfComponent (or otherwise register to the signal manager), and then it will receive two new signals when filter/search is applied: TmfEventFilterAppliedSignal and TmfEventSearchAppliedSignal.
Patrick
On Mon, Dec 3, 2012 at 3:37 AM, Xavier Raynaud
<xavier.raynaud@xxxxxxxxx> wrote:
Hi,
I've a question about traces and filtering: What's the best way to obtain the ITmfEventsFilterProvider of an experiment ?
The TmfTraceOpenedSignal provides access to a ITmfEventsFilterProvider.
Is there an equivalent for a TmfExperiement ?
For now, I retrieve the ITmfEventsFilterProvider with the following code, but it seems a bit crappy:
view = (TmfEventsView) getViewSite().getPage().showView(TmfEventsView.ID, null,
IWorkbenchPage.VIEW_CREATE);
Object o = view.getAdapter(IGotoMarker.class);
if (o instanceof ITmfEventsFilterProvider) {
p = ((ITmfEventsFilterProvider) o);
}
Xavier
_______________________________________________
linuxtools-dev mailing list
linuxtools-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/linuxtools-dev