Discussion:
[mitk-users] Force plugin to load
Nil Goyette
8 years ago
Permalink
Hi all,

I know that we can use Perspective::CreateInitialLayout to ask a plugin
to be at a specific posion and to open. This is working in MOST cases
but not all.

If the user opens another plugin X, stack it on the main plugin, then
close the program, the app will open with plugin X in front of our main
plugin, which will be inactive (You may need to do it many times if you
want to see it. Without --BlueBerry.clean of course). The plugin's
Activator and the view's constructor won't be called.

Wathever plugins is in front of our plugin, we need to load it anyway
because it loads the AUTOLOAD_WITH modules and the constructor of our
view is doing important stuff. So, is there a way to force a plugin to load?
Thank you for your time :)

Nil


------------------------------------------------------------------------------
Kislinskiy, Stefan
8 years ago
Permalink
This may not be the answer you are exactly looking for, but you should consider calling your initialization code from the start method of your plugin activator and set the eager policy. See [1,2] for an example.

Best,
Stefan

[1] https://github.com/MITK/MITK/blob/master/Plugins/org.mitk.simulation/manifest_headers.cmake#L6
[2] https://github.com/MITK/MITK/blob/master/Plugins/org.mitk.simulation/src/internal/org_mitk_simulation_Activator.cpp#L85
________________________________________
Von: Nil Goyette <***@imeka.ca>
Gesendet: Mittwoch, 30. November 2016 21:27
An: mitk-***@lists.sourceforge.net
Betreff: [mitk-users] Force plugin to load

Hi all,

I know that we can use Perspective::CreateInitialLayout to ask a plugin
to be at a specific posion and to open. This is working in MOST cases
but not all.

If the user opens another plugin X, stack it on the main plugin, then
close the program, the app will open with plugin X in front of our main
plugin, which will be inactive (You may need to do it many times if you
want to see it. Without --BlueBerry.clean of course). The plugin's
Activator and the view's constructor won't be called.

Wathever plugins is in front of our plugin, we need to load it anyway
because it loads the AUTOLOAD_WITH modules and the constructor of our
view is doing important stuff. So, is there a way to force a plugin to load?
Thank you for your time :)

Nil
Nil Goyette
8 years ago
Permalink
Hi Stefan,

This is only for non-UI code, right? Setting IO classes, preferences,
node descriptors, etc.?

I ask because I doubt what I want to do is possible. Maybe you can tell.
At the start of our app, we create 3 category nodes: Anatomies, ROIs and
Tracts. Each time a file is loaded, the plugin places the new node in
the right group, based on a predicate. Of course, without our plugin,
the groups don't exist and the nodes just pile up in the DM.

If we can 1) access the DM 2) create nodes 3) be warned when there's a
new node (NodeAdded), then it's perfect. We have other problems, but I'm
pretty sure we can fix them if we can fix this :)

Nil

Le 2016-11-30 à 18:12, Kislinskiy, Stefan a écrit :
> This may not be the answer you are exactly looking for, but you should consider calling your initialization code from the start method of your plugin activator and set the eager policy. See [1,2] for an example.
>
> Best,
> Stefan
>
> [1] https://github.com/MITK/MITK/blob/master/Plugins/org.mitk.simulation/manifest_headers.cmake#L6
> [2] https://github.com/MITK/MITK/blob/master/Plugins/org.mitk.simulation/src/internal/org_mitk_simulation_Activator.cpp#L85
> ________________________________________
> Von: Nil Goyette <***@imeka.ca>
> Gesendet: Mittwoch, 30. November 2016 21:27
> An: mitk-***@lists.sourceforge.net
> Betreff: [mitk-users] Force plugin to load
>
> Hi all,
>
> I know that we can use Perspective::CreateInitialLayout to ask a plugin
> to be at a specific posion and to open. This is working in MOST cases
> but not all.
>
> If the user opens another plugin X, stack it on the main plugin, then
> close the program, the app will open with plugin X in front of our main
> plugin, which will be inactive (You may need to do it many times if you
> want to see it. Without --BlueBerry.clean of course). The plugin's
> Activator and the view's constructor won't be called.
>
> Wathever plugins is in front of our plugin, we need to load it anyway
> because it loads the AUTOLOAD_WITH modules and the constructor of our
> view is doing important stuff. So, is there a way to force a plugin to load?
> Thank you for your time :)
>
> Nil
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> mitk-users mailing list
> mitk-***@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mitk-users


------------------------------------------------------------------------------
Kislinskiy, Stefan
8 years ago
Permalink
Hi,

with this high amount of customization you may be interested in creating your own Workbench-like application were you can set up a default perspective any many more things to your needs. This is quite easy to achieve. Have a look at [1,2] for an example. It also seems to be possible to make a plugin kind of "non-closeable" like the Data Manager.

Best,
Stefan

[1] https://github.com/MITK/MITK/tree/v2016.03.0/Applications/Diffusion
[2] https://github.com/MITK/MITK/tree/v2016.03.0/Plugins/org.mitk.gui.qt.diffusionimagingapp
________________________________________
Von: Nil Goyette <***@imeka.ca>
Gesendet: Donnerstag, 1. Dezember 2016 17:01
An: Kislinskiy, Stefan; mitk-***@lists.sourceforge.net
Betreff: Re: AW: [mitk-users] Force plugin to load

Hi Stefan,

This is only for non-UI code, right? Setting IO classes, preferences,
node descriptors, etc.?

I ask because I doubt what I want to do is possible. Maybe you can tell.
At the start of our app, we create 3 category nodes: Anatomies, ROIs and
Tracts. Each time a file is loaded, the plugin places the new node in
the right group, based on a predicate. Of course, without our plugin,
the groups don't exist and the nodes just pile up in the DM.

If we can 1) access the DM 2) create nodes 3) be warned when there's a
new node (NodeAdded), then it's perfect. We have other problems, but I'm
pretty sure we can fix them if we can fix this :)

Nil

Le 2016-11-30 à 18:12, Kislinskiy, Stefan a écrit :
> This may not be the answer you are exactly looking for, but you should consider calling your initialization code from the start method of your plugin activator and set the eager policy. See [1,2] for an example.
>
> Best,
> Stefan
>
> [1] https://github.com/MITK/MITK/blob/master/Plugins/org.mitk.simulation/manifest_headers.cmake#L6
> [2] https://github.com/MITK/MITK/blob/master/Plugins/org.mitk.simulation/src/internal/org_mitk_simulation_Activator.cpp#L85
> ________________________________________
> Von: Nil Goyette <***@imeka.ca>
> Gesendet: Mittwoch, 30. November 2016 21:27
> An: mitk-***@lists.sourceforge.net
> Betreff: [mitk-users] Force plugin to load
>
> Hi all,
>
> I know that we can use Perspective::CreateInitialLayout to ask a plugin
> to be at a specific posion and to open. This is working in MOST cases
> but not all.
>
> If the user opens another plugin X, stack it on the main plugin, then
> close the program, the app will open with plugin X in front of our main
> plugin, which will be inactive (You may need to do it many times if you
> want to see it. Without --BlueBerry.clean of course). The plugin's
> Activator and the view's constructor won't be called.
>
> Wathever plugins is in front of our plugin, we need to load it anyway
> because it loads the AUTOLOAD_WITH modules and the constructor of our
> view is doing important stuff. So, is there a way to force a plugin to load?
> Thank you for your time :)
>
> Nil
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> mitk-users mailing list
> mitk-***@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mitk-users
Paul Palei
8 years ago
Permalink
Can I please unsubscribe from this list.
Thanks.


-----Original Message-----
From: Kislinskiy, Stefan [mailto:***@Dkfz-Heidelberg.de]
Sent: Friday, December 02, 2016 3:42 AM
To: Nil Goyette <***@imeka.ca>; mitk-***@lists.sourceforge.net
Subject: Re: [mitk-users] Force plugin to load

Hi,

with this high amount of customization you may be interested in creating your own Workbench-like application were you can set up a default perspective any many more things to your needs. This is quite easy to achieve. Have a look at [1,2] for an example. It also seems to be possible to make a plugin kind of "non-closeable" like the Data Manager.

Best,
Stefan

[1] https://github.com/MITK/MITK/tree/v2016.03.0/Applications/Diffusion
[2] https://github.com/MITK/MITK/tree/v2016.03.0/Plugins/org.mitk.gui.qt.diffusionimagingapp
________________________________________
Von: Nil Goyette <***@imeka.ca>
Gesendet: Donnerstag, 1. Dezember 2016 17:01
An: Kislinskiy, Stefan; mitk-***@lists.sourceforge.net
Betreff: Re: AW: [mitk-users] Force plugin to load

Hi Stefan,

This is only for non-UI code, right? Setting IO classes, preferences, node descriptors, etc.?

I ask because I doubt what I want to do is possible. Maybe you can tell.
At the start of our app, we create 3 category nodes: Anatomies, ROIs and Tracts. Each time a file is loaded, the plugin places the new node in the right group, based on a predicate. Of course, without our plugin, the groups don't exist and the nodes just pile up in the DM.

If we can 1) access the DM 2) create nodes 3) be warned when there's a new node (NodeAdded), then it's perfect. We have other problems, but I'm pretty sure we can fix them if we can fix this :)

Nil

Le 2016-11-30 à 18:12, Kislinskiy, Stefan a écrit :
> This may not be the answer you are exactly looking for, but you should consider calling your initialization code from the start method of your plugin activator and set the eager policy. See [1,2] for an example.
>
> Best,
> Stefan
>
> [1]
> https://github.com/MITK/MITK/blob/master/Plugins/org.mitk.simulation/m
> anifest_headers.cmake#L6 [2]
> https://github.com/MITK/MITK/blob/master/Plugins/org.mitk.simulation/s
> rc/internal/org_mitk_simulation_Activator.cpp#L85
> ________________________________________
> Von: Nil Goyette <***@imeka.ca>
> Gesendet: Mittwoch, 30. November 2016 21:27
> An: mitk-***@lists.sourceforge.net
> Betreff: [mitk-users] Force plugin to load
>
> Hi all,
>
> I know that we can use Perspective::CreateInitialLayout to ask a
> plugin to be at a specific posion and to open. This is working in MOST
> cases but not all.
>
> If the user opens another plugin X, stack it on the main plugin, then
> close the program, the app will open with plugin X in front of our
> main plugin, which will be inactive (You may need to do it many times
> if you want to see it. Without --BlueBerry.clean of course). The
> plugin's Activator and the view's constructor won't be called.
>
> Wathever plugins is in front of our plugin, we need to load it anyway
> because it loads the AUTOLOAD_WITH modules and the constructor of our
> view is doing important stuff. So, is there a way to force a plugin to load?
> Thank you for your time :)
>
> Nil
>
>
> ----------------------------------------------------------------------
> -------- _______________________________________________
> mitk-users mailing list
> mitk-***@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mitk-users


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________
mitk-users mailing list
mitk-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users
Kislinskiy, Stefan
8 years ago
Permalink
Yes, of course. As I already wrote, you can unsubscribe at the bottom of this page: https://lists.sourceforge.net/lists/listinfo/mitk-users
Please don't spam the list, thank you.

Best regards,
Stefan
________________________________________
Von: Paul Palei <***@mit.edu>
Gesendet: Freitag, 2. Dezember 2016 15:24
An: Kislinskiy, Stefan; Nil Goyette; mitk-***@lists.sourceforge.net
Betreff: RE: [mitk-users] Force plugin to load

Can I please unsubscribe from this list.
Thanks.


-----Original Message-----
From: Kislinskiy, Stefan [mailto:***@Dkfz-Heidelberg.de]
Sent: Friday, December 02, 2016 3:42 AM
To: Nil Goyette <***@imeka.ca>; mitk-***@lists.sourceforge.net
Subject: Re: [mitk-users] Force plugin to load

Hi,

with this high amount of customization you may be interested in creating your own Workbench-like application were you can set up a default perspective any many more things to your needs. This is quite easy to achieve. Have a look at [1,2] for an example. It also seems to be possible to make a plugin kind of "non-closeable" like the Data Manager.

Best,
Stefan

[1] https://github.com/MITK/MITK/tree/v2016.03.0/Applications/Diffusion
[2] https://github.com/MITK/MITK/tree/v2016.03.0/Plugins/org.mitk.gui.qt.diffusionimagingapp
________________________________________
Von: Nil Goyette <***@imeka.ca>
Gesendet: Donnerstag, 1. Dezember 2016 17:01
An: Kislinskiy, Stefan; mitk-***@lists.sourceforge.net
Betreff: Re: AW: [mitk-users] Force plugin to load

Hi Stefan,

This is only for non-UI code, right? Setting IO classes, preferences, node descriptors, etc.?

I ask because I doubt what I want to do is possible. Maybe you can tell.
At the start of our app, we create 3 category nodes: Anatomies, ROIs and Tracts. Each time a file is loaded, the plugin places the new node in the right group, based on a predicate. Of course, without our plugin, the groups don't exist and the nodes just pile up in the DM.

If we can 1) access the DM 2) create nodes 3) be warned when there's a new node (NodeAdded), then it's perfect. We have other problems, but I'm pretty sure we can fix them if we can fix this :)

Nil

Le 2016-11-30 à 18:12, Kislinskiy, Stefan a écrit :
> This may not be the answer you are exactly looking for, but you should consider calling your initialization code from the start method of your plugin activator and set the eager policy. See [1,2] for an example.
>
> Best,
> Stefan
>
> [1]
> https://github.com/MITK/MITK/blob/master/Plugins/org.mitk.simulation/m
> anifest_headers.cmake#L6 [2]
> https://github.com/MITK/MITK/blob/master/Plugins/org.mitk.simulation/s
> rc/internal/org_mitk_simulation_Activator.cpp#L85
> ________________________________________
> Von: Nil Goyette <***@imeka.ca>
> Gesendet: Mittwoch, 30. November 2016 21:27
> An: mitk-***@lists.sourceforge.net
> Betreff: [mitk-users] Force plugin to load
>
> Hi all,
>
> I know that we can use Perspective::CreateInitialLayout to ask a
> plugin to be at a specific posion and to open. This is working in MOST
> cases but not all.
>
> If the user opens another plugin X, stack it on the main plugin, then
> close the program, the app will open with plugin X in front of our
> main plugin, which will be inactive (You may need to do it many times
> if you want to see it. Without --BlueBerry.clean of course). The
> plugin's Activator and the view's constructor won't be called.
>
> Wathever plugins is in front of our plugin, we need to load it anyway
> because it loads the AUTOLOAD_WITH modules and the constructor of our
> view is doing important stuff. So, is there a way to force a plugin to load?
> Thank you for your time :)
>
> Nil
>
>
> ----------------------------------------------------------------------
> -------- _______________________________________________
> mitk-users mailing list
> mitk-***@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mitk-users


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________
mitk-users mailing list
mitk-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users
Paul Palei
8 years ago
Permalink
Yes I did that and I am still getting emails!


-----Original Message-----
From: Kislinskiy, Stefan [mailto:***@Dkfz-Heidelberg.de]
Sent: Friday, December 02, 2016 10:41 AM
To: Paul Palei <***@mit.edu>; mitk-***@lists.sourceforge.net
Subject: AW: [mitk-users] Force plugin to load

Yes, of course. As I already wrote, you can unsubscribe at the bottom of this page: https://lists.sourceforge.net/lists/listinfo/mitk-users
Please don't spam the list, thank you.

Best regards,
Stefan
________________________________________
Von: Paul Palei <***@mit.edu>
Gesendet: Freitag, 2. Dezember 2016 15:24
An: Kislinskiy, Stefan; Nil Goyette; mitk-***@lists.sourceforge.net
Betreff: RE: [mitk-users] Force plugin to load

Can I please unsubscribe from this list.
Thanks.


-----Original Message-----
From: Kislinskiy, Stefan [mailto:***@Dkfz-Heidelberg.de]
Sent: Friday, December 02, 2016 3:42 AM
To: Nil Goyette <***@imeka.ca>; mitk-***@lists.sourceforge.net
Subject: Re: [mitk-users] Force plugin to load

Hi,

with this high amount of customization you may be interested in creating your own Workbench-like application were you can set up a default perspective any many more things to your needs. This is quite easy to achieve. Have a look at [1,2] for an example. It also seems to be possible to make a plugin kind of "non-closeable" like the Data Manager.

Best,
Stefan

[1] https://github.com/MITK/MITK/tree/v2016.03.0/Applications/Diffusion
[2] https://github.com/MITK/MITK/tree/v2016.03.0/Plugins/org.mitk.gui.qt.diffusionimagingapp
________________________________________
Von: Nil Goyette <***@imeka.ca>
Gesendet: Donnerstag, 1. Dezember 2016 17:01
An: Kislinskiy, Stefan; mitk-***@lists.sourceforge.net
Betreff: Re: AW: [mitk-users] Force plugin to load

Hi Stefan,

This is only for non-UI code, right? Setting IO classes, preferences, node descriptors, etc.?

I ask because I doubt what I want to do is possible. Maybe you can tell.
At the start of our app, we create 3 category nodes: Anatomies, ROIs and Tracts. Each time a file is loaded, the plugin places the new node in the right group, based on a predicate. Of course, without our plugin, the groups don't exist and the nodes just pile up in the DM.

If we can 1) access the DM 2) create nodes 3) be warned when there's a new node (NodeAdded), then it's perfect. We have other problems, but I'm pretty sure we can fix them if we can fix this :)

Nil

Le 2016-11-30 à 18:12, Kislinskiy, Stefan a écrit :
> This may not be the answer you are exactly looking for, but you should consider calling your initialization code from the start method of your plugin activator and set the eager policy. See [1,2] for an example.
>
> Best,
> Stefan
>
> [1]
> https://github.com/MITK/MITK/blob/master/Plugins/org.mitk.simulation/m
> anifest_headers.cmake#L6 [2]
> https://github.com/MITK/MITK/blob/master/Plugins/org.mitk.simulation/s
> rc/internal/org_mitk_simulation_Activator.cpp#L85
> ________________________________________
> Von: Nil Goyette <***@imeka.ca>
> Gesendet: Mittwoch, 30. November 2016 21:27
> An: mitk-***@lists.sourceforge.net
> Betreff: [mitk-users] Force plugin to load
>
> Hi all,
>
> I know that we can use Perspective::CreateInitialLayout to ask a
> plugin to be at a specific posion and to open. This is working in MOST
> cases but not all.
>
> If the user opens another plugin X, stack it on the main plugin, then
> close the program, the app will open with plugin X in front of our
> main plugin, which will be inactive (You may need to do it many times
> if you want to see it. Without --BlueBerry.clean of course). The
> plugin's Activator and the view's constructor won't be called.
>
> Wathever plugins is in front of our plugin, we need to load it anyway
> because it loads the AUTOLOAD_WITH modules and the constructor of our
> view is doing important stuff. So, is there a way to force a plugin to load?
> Thank you for your time :)
>
> Nil
>
>
> ----------------------------------------------------------------------
> -------- _______________________________________________
> mitk-users mailing list
> mitk-***@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mitk-users


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________
mitk-users mailing list
mitk-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users
Kislinskiy, Stefan
8 years ago
Permalink
I did it for you, but you still have to click on the confirmation link in the email that you should have received a few seconds ago.
________________________________________
Von: Paul Palei <***@mit.edu>
Gesendet: Freitag, 2. Dezember 2016 16:43
An: Kislinskiy, Stefan; mitk-***@lists.sourceforge.net
Betreff: RE: [mitk-users] Force plugin to load

Yes I did that and I am still getting emails!


-----Original Message-----
From: Kislinskiy, Stefan [mailto:***@Dkfz-Heidelberg.de]
Sent: Friday, December 02, 2016 10:41 AM
To: Paul Palei <***@mit.edu>; mitk-***@lists.sourceforge.net
Subject: AW: [mitk-users] Force plugin to load

Yes, of course. As I already wrote, you can unsubscribe at the bottom of this page: https://lists.sourceforge.net/lists/listinfo/mitk-users
Please don't spam the list, thank you.

Best regards,
Stefan
________________________________________
Von: Paul Palei <***@mit.edu>
Gesendet: Freitag, 2. Dezember 2016 15:24
An: Kislinskiy, Stefan; Nil Goyette; mitk-***@lists.sourceforge.net
Betreff: RE: [mitk-users] Force plugin to load

Can I please unsubscribe from this list.
Thanks.


-----Original Message-----
From: Kislinskiy, Stefan [mailto:***@Dkfz-Heidelberg.de]
Sent: Friday, December 02, 2016 3:42 AM
To: Nil Goyette <***@imeka.ca>; mitk-***@lists.sourceforge.net
Subject: Re: [mitk-users] Force plugin to load

Hi,

with this high amount of customization you may be interested in creating your own Workbench-like application were you can set up a default perspective any many more things to your needs. This is quite easy to achieve. Have a look at [1,2] for an example. It also seems to be possible to make a plugin kind of "non-closeable" like the Data Manager.

Best,
Stefan

[1] https://github.com/MITK/MITK/tree/v2016.03.0/Applications/Diffusion
[2] https://github.com/MITK/MITK/tree/v2016.03.0/Plugins/org.mitk.gui.qt.diffusionimagingapp
________________________________________
Von: Nil Goyette <***@imeka.ca>
Gesendet: Donnerstag, 1. Dezember 2016 17:01
An: Kislinskiy, Stefan; mitk-***@lists.sourceforge.net
Betreff: Re: AW: [mitk-users] Force plugin to load

Hi Stefan,

This is only for non-UI code, right? Setting IO classes, preferences, node descriptors, etc.?

I ask because I doubt what I want to do is possible. Maybe you can tell.
At the start of our app, we create 3 category nodes: Anatomies, ROIs and Tracts. Each time a file is loaded, the plugin places the new node in the right group, based on a predicate. Of course, without our plugin, the groups don't exist and the nodes just pile up in the DM.

If we can 1) access the DM 2) create nodes 3) be warned when there's a new node (NodeAdded), then it's perfect. We have other problems, but I'm pretty sure we can fix them if we can fix this :)

Nil

Le 2016-11-30 à 18:12, Kislinskiy, Stefan a écrit :
> This may not be the answer you are exactly looking for, but you should consider calling your initialization code from the start method of your plugin activator and set the eager policy. See [1,2] for an example.
>
> Best,
> Stefan
>
> [1]
> https://github.com/MITK/MITK/blob/master/Plugins/org.mitk.simulation/m
> anifest_headers.cmake#L6 [2]
> https://github.com/MITK/MITK/blob/master/Plugins/org.mitk.simulation/s
> rc/internal/org_mitk_simulation_Activator.cpp#L85
> ________________________________________
> Von: Nil Goyette <***@imeka.ca>
> Gesendet: Mittwoch, 30. November 2016 21:27
> An: mitk-***@lists.sourceforge.net
> Betreff: [mitk-users] Force plugin to load
>
> Hi all,
>
> I know that we can use Perspective::CreateInitialLayout to ask a
> plugin to be at a specific posion and to open. This is working in MOST
> cases but not all.
>
> If the user opens another plugin X, stack it on the main plugin, then
> close the program, the app will open with plugin X in front of our
> main plugin, which will be inactive (You may need to do it many times
> if you want to see it. Without --BlueBerry.clean of course). The
> plugin's Activator and the view's constructor won't be called.
>
> Wathever plugins is in front of our plugin, we need to load it anyway
> because it loads the AUTOLOAD_WITH modules and the constructor of our
> view is doing important stuff. So, is there a way to force a plugin to load?
> Thank you for your time :)
>
> Nil
>
>
> ----------------------------------------------------------------------
> -------- _______________________________________________
> mitk-users mailing list
> mitk-***@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mitk-users


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________
mitk-users mailing list
mitk-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users
Nil Goyette
8 years ago
Permalink
Hi,

Yes, we are already using this. We have our own app, perspective,
preferences, WorkbenchWindowAdvisor, etc. We may not be aware of all the
things we can do with these classes though. I think they are mostly used
to set up the UI. Do you have a particular idea in mind on how to do
what I want?

We also use SetCloseable(false); on our plugin. It's never closed...
it's just not opened/activated ;) when there's another plugin in front.

Nil

Le 2016-12-02 à 03:42, Kislinskiy, Stefan a écrit :
> Hi,
>
> with this high amount of customization you may be interested in creating your own Workbench-like application were you can set up a default perspective any many more things to your needs. This is quite easy to achieve. Have a look at [1,2] for an example. It also seems to be possible to make a plugin kind of "non-closeable" like the Data Manager.
>
> Best,
> Stefan
>
> [1] https://github.com/MITK/MITK/tree/v2016.03.0/Applications/Diffusion
> [2] https://github.com/MITK/MITK/tree/v2016.03.0/Plugins/org.mitk.gui.qt.diffusionimagingapp
> ________________________________________
> Von: Nil Goyette <***@imeka.ca>
> Gesendet: Donnerstag, 1. Dezember 2016 17:01
> An: Kislinskiy, Stefan; mitk-***@lists.sourceforge.net
> Betreff: Re: AW: [mitk-users] Force plugin to load
>
> Hi Stefan,
>
> This is only for non-UI code, right? Setting IO classes, preferences,
> node descriptors, etc.?
>
> I ask because I doubt what I want to do is possible. Maybe you can tell.
> At the start of our app, we create 3 category nodes: Anatomies, ROIs and
> Tracts. Each time a file is loaded, the plugin places the new node in
> the right group, based on a predicate. Of course, without our plugin,
> the groups don't exist and the nodes just pile up in the DM.
>
> If we can 1) access the DM 2) create nodes 3) be warned when there's a
> new node (NodeAdded), then it's perfect. We have other problems, but I'm
> pretty sure we can fix them if we can fix this :)
>
> Nil
>
> Le 2016-11-30 à 18:12, Kislinskiy, Stefan a écrit :
>> This may not be the answer you are exactly looking for, but you should consider calling your initialization code from the start method of your plugin activator and set the eager policy. See [1,2] for an example.
>>
>> Best,
>> Stefan
>>
>> [1] https://github.com/MITK/MITK/blob/master/Plugins/org.mitk.simulation/manifest_headers.cmake#L6
>> [2] https://github.com/MITK/MITK/blob/master/Plugins/org.mitk.simulation/src/internal/org_mitk_simulation_Activator.cpp#L85
>> ________________________________________
>> Von: Nil Goyette <***@imeka.ca>
>> Gesendet: Mittwoch, 30. November 2016 21:27
>> An: mitk-***@lists.sourceforge.net
>> Betreff: [mitk-users] Force plugin to load
>>
>> Hi all,
>>
>> I know that we can use Perspective::CreateInitialLayout to ask a plugin
>> to be at a specific posion and to open. This is working in MOST cases
>> but not all.
>>
>> If the user opens another plugin X, stack it on the main plugin, then
>> close the program, the app will open with plugin X in front of our main
>> plugin, which will be inactive (You may need to do it many times if you
>> want to see it. Without --BlueBerry.clean of course). The plugin's
>> Activator and the view's constructor won't be called.
>>
>> Wathever plugins is in front of our plugin, we need to load it anyway
>> because it loads the AUTOLOAD_WITH modules and the constructor of our
>> view is doing important stuff. So, is there a way to force a plugin to load?
>> Thank you for your time :)
>>
>> Nil
>>
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> mitk-users mailing list
>> mitk-***@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/mitk-users
Nil Goyette
8 years ago
Permalink
Hi Stefan, Hi poor Paul Palei,

I found a way to do what I want. Turns out an 'eager' plugin can access
the good old IDataStorageService, which I can use to add my category
nodes AND add a listener so I can change the node's parent when they are
loaded.

Of course it would be better if I could force my plugin to load but it's
probably a big can of worms. Thank you for your help.

Nil

Le 2016-12-02 à 11:06, Nil Goyette a écrit :
> Hi,
>
> Yes, we are already using this. We have our own app, perspective,
> preferences, WorkbenchWindowAdvisor, etc. We may not be aware of all the
> things we can do with these classes though. I think they are mostly used
> to set up the UI. Do you have a particular idea in mind on how to do
> what I want?
>
> We also use SetCloseable(false); on our plugin. It's never closed...
> it's just not opened/activated ;) when there's another plugin in front.
>
> Nil
>
> Le 2016-12-02 à 03:42, Kislinskiy, Stefan a écrit :
>> Hi,
>>
>> with this high amount of customization you may be interested in creating your own Workbench-like application were you can set up a default perspective any many more things to your needs. This is quite easy to achieve. Have a look at [1,2] for an example. It also seems to be possible to make a plugin kind of "non-closeable" like the Data Manager.
>>
>> Best,
>> Stefan
>>
>> [1] https://github.com/MITK/MITK/tree/v2016.03.0/Applications/Diffusion
>> [2] https://github.com/MITK/MITK/tree/v2016.03.0/Plugins/org.mitk.gui.qt.diffusionimagingapp
>> ________________________________________
>> Von: Nil Goyette <***@imeka.ca>
>> Gesendet: Donnerstag, 1. Dezember 2016 17:01
>> An: Kislinskiy, Stefan; mitk-***@lists.sourceforge.net
>> Betreff: Re: AW: [mitk-users] Force plugin to load
>>
>> Hi Stefan,
>>
>> This is only for non-UI code, right? Setting IO classes, preferences,
>> node descriptors, etc.?
>>
>> I ask because I doubt what I want to do is possible. Maybe you can tell.
>> At the start of our app, we create 3 category nodes: Anatomies, ROIs and
>> Tracts. Each time a file is loaded, the plugin places the new node in
>> the right group, based on a predicate. Of course, without our plugin,
>> the groups don't exist and the nodes just pile up in the DM.
>>
>> If we can 1) access the DM 2) create nodes 3) be warned when there's a
>> new node (NodeAdded), then it's perfect. We have other problems, but I'm
>> pretty sure we can fix them if we can fix this :)
>>
>> Nil
>>
>> Le 2016-11-30 à 18:12, Kislinskiy, Stefan a écrit :
>>> This may not be the answer you are exactly looking for, but you should consider calling your initialization code from the start method of your plugin activator and set the eager policy. See [1,2] for an example.
>>>
>>> Best,
>>> Stefan
>>>
>>> [1] https://github.com/MITK/MITK/blob/master/Plugins/org.mitk.simulation/manifest_headers.cmake#L6
>>> [2] https://github.com/MITK/MITK/blob/master/Plugins/org.mitk.simulation/src/internal/org_mitk_simulation_Activator.cpp#L85
>>> ________________________________________
>>> Von: Nil Goyette <***@imeka.ca>
>>> Gesendet: Mittwoch, 30. November 2016 21:27
>>> An: mitk-***@lists.sourceforge.net
>>> Betreff: [mitk-users] Force plugin to load
>>>
>>> Hi all,
>>>
>>> I know that we can use Perspective::CreateInitialLayout to ask a plugin
>>> to be at a specific posion and to open. This is working in MOST cases
>>> but not all.
>>>
>>> If the user opens another plugin X, stack it on the main plugin, then
>>> close the program, the app will open with plugin X in front of our main
>>> plugin, which will be inactive (You may need to do it many times if you
>>> want to see it. Without --BlueBerry.clean of course). The plugin's
>>> Activator and the view's constructor won't be called.
>>>
>>> Wathever plugins is in front of our plugin, we need to load it anyway
>>> because it loads the AUTOLOAD_WITH modules and the constructor of our
>>> view is doing important stuff. So, is there a way to force a plugin to load?
>>> Thank you for your time :)
>>>
>>> Nil
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> _______________________________________________
>>> mitk-users mailing list
>>> mitk-***@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/mitk-users
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> mitk-users mailing list
> mitk-***@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mitk-users
Nil Goyette
8 years ago
Permalink
Hi all,

In fact, I searched in your codebase how to open a view by ID and found
this snippet:
auto workbench = berry::PlatformUI::GetWorkbench();
auto window = workbench->GetActiveWorkbenchWindow();
berry::IWorkbenchPage::Pointer page = window->GetActivePage();
page->ShowView(viewID);

I had some problem because I was writing the plugin's ID instead of the
view's, but it's working perfectly now. I wrote this snippet on the last
line of my WorkbenchWindowAdvisor::PostWindowCreate() and everything
seems ok. Of course, it would be better if the plugin loaded without
forcing it to display but this is by far the best solution I found.

Nil

Le 2016-12-02 à 17:48, Nil Goyette a écrit :
> Hi Stefan, Hi poor Paul Palei,
>
> I found a way to do what I want. Turns out an 'eager' plugin can access
> the good old IDataStorageService, which I can use to add my category
> nodes AND add a listener so I can change the node's parent when they are
> loaded.
>
> Of course it would be better if I could force my plugin to load but it's
> probably a big can of worms. Thank you for your help.
>
> Nil
>
> Le 2016-12-02 à 11:06, Nil Goyette a écrit :
>> Hi,
>>
>> Yes, we are already using this. We have our own app, perspective,
>> preferences, WorkbenchWindowAdvisor, etc. We may not be aware of all the
>> things we can do with these classes though. I think they are mostly used
>> to set up the UI. Do you have a particular idea in mind on how to do
>> what I want?
>>
>> We also use SetCloseable(false); on our plugin. It's never closed...
>> it's just not opened/activated ;) when there's another plugin in front.
>>
>> Nil
>>
>> Le 2016-12-02 à 03:42, Kislinskiy, Stefan a écrit :
>>> Hi,
>>>
>>> with this high amount of customization you may be interested in creating your own Workbench-like application were you can set up a default perspective any many more things to your needs. This is quite easy to achieve. Have a look at [1,2] for an example. It also seems to be possible to make a plugin kind of "non-closeable" like the Data Manager.
>>>
>>> Best,
>>> Stefan
>>>
>>> [1] https://github.com/MITK/MITK/tree/v2016.03.0/Applications/Diffusion
>>> [2] https://github.com/MITK/MITK/tree/v2016.03.0/Plugins/org.mitk.gui.qt.diffusionimagingapp
>>> ________________________________________
>>> Von: Nil Goyette <***@imeka.ca>
>>> Gesendet: Donnerstag, 1. Dezember 2016 17:01
>>> An: Kislinskiy, Stefan; mitk-***@lists.sourceforge.net
>>> Betreff: Re: AW: [mitk-users] Force plugin to load
>>>
>>> Hi Stefan,
>>>
>>> This is only for non-UI code, right? Setting IO classes, preferences,
>>> node descriptors, etc.?
>>>
>>> I ask because I doubt what I want to do is possible. Maybe you can tell.
>>> At the start of our app, we create 3 category nodes: Anatomies, ROIs and
>>> Tracts. Each time a file is loaded, the plugin places the new node in
>>> the right group, based on a predicate. Of course, without our plugin,
>>> the groups don't exist and the nodes just pile up in the DM.
>>>
>>> If we can 1) access the DM 2) create nodes 3) be warned when there's a
>>> new node (NodeAdded), then it's perfect. We have other problems, but I'm
>>> pretty sure we can fix them if we can fix this :)
>>>
>>> Nil
>>>
>>> Le 2016-11-30 à 18:12, Kislinskiy, Stefan a écrit :
>>>> This may not be the answer you are exactly looking for, but you should consider calling your initialization code from the start method of your plugin activator and set the eager policy. See [1,2] for an example.
>>>>
>>>> Best,
>>>> Stefan
>>>>
>>>> [1] https://github.com/MITK/MITK/blob/master/Plugins/org.mitk.simulation/manifest_headers.cmake#L6
>>>> [2] https://github.com/MITK/MITK/blob/master/Plugins/org.mitk.simulation/src/internal/org_mitk_simulation_Activator.cpp#L85
>>>> ________________________________________
>>>> Von: Nil Goyette <***@imeka.ca>
>>>> Gesendet: Mittwoch, 30. November 2016 21:27
>>>> An: mitk-***@lists.sourceforge.net
>>>> Betreff: [mitk-users] Force plugin to load
>>>>
>>>> Hi all,
>>>>
>>>> I know that we can use Perspective::CreateInitialLayout to ask a plugin
>>>> to be at a specific posion and to open. This is working in MOST cases
>>>> but not all.
>>>>
>>>> If the user opens another plugin X, stack it on the main plugin, then
>>>> close the program, the app will open with plugin X in front of our main
>>>> plugin, which will be inactive (You may need to do it many times if you
>>>> want to see it. Without --BlueBerry.clean of course). The plugin's
>>>> Activator and the view's constructor won't be called.
>>>>
>>>> Wathever plugins is in front of our plugin, we need to load it anyway
>>>> because it loads the AUTOLOAD_WITH modules and the constructor of our
>>>> view is doing important stuff. So, is there a way to force a plugin to load?
>>>> Thank you for your time :)
>>>>
>>>> Nil
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> _______________________________________________
>>>> mitk-users mailing list
>>>> mitk-***@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/mitk-users
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>> _______________________________________________
>> mitk-users mailing list
>> mitk-***@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/mitk-users
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> mitk-users mailing list
> mitk-***@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mitk-users


------------------------------------------------------------------------------
Loading...