Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tracecompass-dev] [TC incubator] Data provider and its factory is not called

Hi Geneviève,


Got it, it's very clear, so I would change the id to be the one without "Factory", Thanks a lot!


Best,​

Yang


From: tracecompass-dev-bounces@xxxxxxxxxxx <tracecompass-dev-bounces@xxxxxxxxxxx> on behalf of tracecompass developer discussions <tracecompass-dev@xxxxxxxxxxx>
Sent: Friday, May 15, 2020 4:50 PM
To: tracecompass developer discussions
Subject: Re: [tracecompass-dev] [TC incubator] Data provider and its factory is not called
 

Hi,


On 5/15/20 10:30 AM, tracecompass developer discussions wrote:
Hi Geneviève,


It helps, now the view is showing something! Thanks a lot! 


But may I ask why should I the ID of the data provider be identical to the ID of the factory?

Actually, the factory element in the plugin.xml file means "what is the factory class to get the data provider with ID". So the factory itself does not have an ID. Maybe we should have called the attribute dataProviderId instead of simply id, but we didn't...


Geneviève




What if I modify the 


id = "org.eclipse.tracecompass.incubator.internal.jpftrace.ui.view.JpfThreadStatusDataProviderFactory"


to be 


id = "org.eclipse.tracecompass.incubator.internal.jpftrace.ui.view.JpfThreadStatusDataProvider"


will this disable the program to find my provider factory class? 


Yang 


From: tracecompass-dev-bounces@xxxxxxxxxxx <tracecompass-dev-bounces@xxxxxxxxxxx> on behalf of tracecompass developer discussions <tracecompass-dev@xxxxxxxxxxx>
Sent: Friday, May 15, 2020 4:11 PM
To: tracecompass-dev@xxxxxxxxxxx
Subject: Re: [tracecompass-dev] [TC incubator] Data provider and its factory is not called
 

Hi Yang,


Quick check: is JpfThreadStatusDataProvider.ID equal to org.eclipse.tracecompass.incubator.internal.jpftrace.ui.view.JpfThreadStatusDataProviderFactory (the id in your factory declaration in plugin.xml)?


These 2 values should match.


HTH,

Geneviève


On 5/15/20 9:42 AM, tracecompass developer discussions wrote:

Hi,


I'm implementing a new trace type and try to visualize it by extending the control flow view, but I encountered some problems and would like to ask your help.


Formerly my trace implements IKernelTrace so it could be drawn by the Control Flow View. 

Now I want to make my own trace events types(not only the ones in DefaultEventLayout) such as thread_wait, thread_notify, etc. I also expect to draw more elements on the chart denoting these type of events.


Now I created a ui module for my trace, the view class extends ControlFlowView, and override the getProviderId() function by returning the ID of my extended JpfThreadStatusDataProvider:


    @Override
    protected String getProviderId() {
        return JpfThreadStatusDataProvider.ID;
    }


I've also created a factory for my data provider and try to hook it to the dataprovider point in plugin.xml, and I do like this:


   <extension
         point="org.eclipse.tracecompass.tmf.core.dataprovider">
      <dataProviderFactory
              class="org.eclipse.tracecompass.incubator.internal.jpftrace.ui.view.JpfThreadStatusDataProviderFactory"
              id="org.eclipse.tracecompass.incubator.internal.jpftrace.ui.view.JpfThreadStatusDataProviderFactory">
      </dataProviderFactory>
   </extension>


But from the running and logging, I could see that:


* My view window could be opened, but there's nothing in it. 

        (there should be a graph at least the same athe control flow view if it works)


* The JpfTraceControlFlowView is constructed, and the overrided getProviderId() is called;


The function createProvider() of my data provider factory is never called;

so my JpfThreadStatusDataProvider is not instantiated.


How should I check if I miss anything for it to work? Or should I do it in another way to create the expected features?


Thank you a lot in advance,


Yang


_______________________________________________
tracecompass-dev mailing list
tracecompass-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/tracecompass-dev

_______________________________________________
tracecompass-dev mailing list
tracecompass-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/tracecompass-dev

Back to the top