Hi Jagir,

I don't remember the details of the ctkPluginFrameworkLauncher::start 
method, but I am pretty sure that it has some constraints which are not 
met when using the MITK application framework BlueBerry. I assume you 
*are* using BlueBerry.

If you set the activation policy correctly, and if the plug-in is listed 
in your applications .provisioning file, you are set. So you could check 
that file (in your applications binary directory) to see if it lists 
your plug-in.

Best,
Sascha

On 08/18/2015 01:01 PM, Jagir Hussan wrote:
> Hi Sascha,
>    Many thanks for the pointers. I am trying to load a plugin that 
> generates events (say to synchronize them etc). I tried the activation 
> policy and also made other plugins have a dependency on this plugin. 
> Unfortunately, the plugin does not load. If however, I enable a view 
> and start it in the workbench and it starts!
> I extended the mikt::BaseApplication class as follows
>
> class BaseApplication: public mitk::BaseApplication{
> public:
>     BaseApplication(int argc, char** argv) : 
> mitk::BaseApplication(argc, argv){
>
>     };
>
>     bool startPlugin(char* pluginName){
>         getQApplication(); //Initialize QCoreApplication
>         bool res = ctkPluginFrameworkLauncher::start(pluginName);
>         return res;
>     };
> };
>
> and called the startPlugin method post initialization of an instance. 
> My plugin is in the Plugins directory, so I provided this detail using
> ctkPluginFrameworkLauncher::addSearchPath("Plugins",true);
> prior to the startPlugin invokation. Unfortunately, the plugin is not 
> started (I get a false value returned).
>
> Am I doing something incorrect? Is there another design pattern that 
> you think is suitable?
>
> Many thanks
> Jagir
>
> On 18/08/2015 5:53 p.m., Sascha Zelzer wrote:
>> Hi Jagir,
>>
>> You can use the "Plugin-ActivationPolicy" header in the plugins
>> manifest_headers.cmake file. See for example [1].
>>
>> Another approach is to call ctkPlugin::start() explicitly from an
>> overridden method in mitk::BaseApplication.
>>
>> In general however, explicitly loading a plugin can often be avoided by
>> using a different technique, depending on what you are trying to 
>> achieve.
>>
>> Best,
>> Sascha
>>
>> [1]
>> http://mitk.org/git/?p=MITK.git;a=blob;f=Plugins/org.mitk.planarfigure/manifest_headers.cmake;h=5b2d8e50e355af309d8cda55d4ee233f5230cabb;hb=HEAD#l6
>>  
>>
>>
>> On 08/18/2015 03:27 AM, Jagir Hussan wrote:
>>> Hi,
>>>        I would like to launch a plugin, which does not have a view, 
>>> when
>>> the mitk baseapplication starts. Is there any api similar to
>>> ctkPluginFrameworkLauncher::start that I could use to start the plugin?
>>>
>>> Thanks
>>> Jagir
>>>
>>> ------------------------------------------------------------------------------
>>>  
>>>
>>> _______________________________________________
>>> mitk-users mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/mitk-users
>>
>> ------------------------------------------------------------------------------
>>  
>>
>> _______________________________________________
>> mitk-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/mitk-users
>


------------------------------------------------------------------------------
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to