Hi Xavier,

Probably not, because that interface will no longer exist in 2.0, so the
change wouldn't show up in any linuxtools release.

Patrick

On Mon, Dec 3, 2012 at 11:45 AM, Xavier Raynaud <xavier.rayn...@kalray.eu>wrote:

> **
> Ok, thanks.
>
> Do you think it can be useful to enhance the current getAdapter() method,
> like this ?
>
>     /* (non-Javadoc)
>      * @see org.eclipse.ui.part.WorkbenchPart#getAdapter(java.lang.Class)
>      */
>     @SuppressWarnings("rawtypes")
>     @Override
>     public Object getAdapter(Class adapter) {
>         if (IGotoMarker.class.equals(adapter) ||
> ITmfEventsFilterProvider.class.equals(adapter)) {
>             return fEventsTable;
>         }
>         return super.getAdapter(adapter);
>     }
>
> Xavier
>
>
> On 12/03/2012 05:31 PM, Patrick Tasse wrote:
>
> 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.rayn...@kalray.eu>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@eclipse.org
>> https://dev.eclipse.org/mailman/listinfo/linuxtools-dev
>>
>
>
>
> _______________________________________________
> linuxtools-dev mailing list
> linuxtools-dev@eclipse.org
> https://dev.eclipse.org/mailman/listinfo/linuxtools-dev
>
>
_______________________________________________
linuxtools-dev mailing list
linuxtools-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/linuxtools-dev

Reply via email to