Hi Rostislav,thanks for reporting your solution. This is definitely a bug / missing feature and worth filing a bug. It looks like this could / should be catched in the build system already.
Please add me as the assignee for this bug report. Thanks, Sascha On 12/11/2014 02:59 PM, Rostislav Khlebnikov wrote:
Ok, I found the problem by specifying /BlueBerry.consoleLog - my eager plugin was called "blablabla_Eager" and the underscore confused the BlueBerry system. Changing that to the "blablabla.Eager" fixed the problem. I would say that it would be nice to see this kind of errors in the log without specifying this flag - it is an error after all.Interestingly enough, even if I'd use the plugin generator - it wouldn't complain about this naming issue - is it something worth filing a bug?All best, Rostislav. On 11/12/2014 13:24, Rostislav Khlebnikov wrote:Just to confirm - if I manually add the include directories and link libraries of "eager" plugin to "views" plugin - everything works correctly. But with the dependency in manifest-headers - it doesn't.Rostislav. On 11/12/2014 13:08, Rostislav Khlebnikov wrote:Hi again,I am now trying to divide my plugin into two parts - one with eager initialization which will prepare the NodeDescriptors for the data manager and the main one with the views and data manager actions (without eager initialization). The problem is - as soon as I make a dependency in the manifest_headers from the "views" plugin to the "eager" plugin - the activator of the "views" plugin is not called and I cannot see my views in any lists or menus anymore and the datamanager actions are not shown as well. Without this dependency the "views" plugin is loaded and started correctly - when the datamanager action is executed or a view is opened.Any ideas why this might happen or how to debug this? Thank you, Rostislav. On 09/12/2014 11:15, Sascha Zelzer wrote:Hi,there are a couple of things going on and I will try to break them down into separate issues:1. Reader/Writer instances may be registered at runtime at any point in time and they will be picked up by the framework. Obviously, the shared library (module/plugin) needs to be loaded for this to work.2. Contributions to the workbench (views, context menu entries, etc.) *should* be available to the application without loading the plugin. However, this depends on the implementation of the plugin consuming these contributions. Unfortunately, parts of the datamanager plugin require contributing plugins to be started (their shared library being loaded into memory)Functionality can be contributed to an application from modules and plugins. For reader/writers, the contributor must currently be loaded into memory. For other stuff, point 2 above applies. To load something during application start-up, you have the following options:1. Put your code into a module and use the AUTOLOAD_WITH feature (e.g. loading it together with the MitkCore module). This obviously does not work for contributions related to the application framework2. Use a plug-in with "eager" activation policy. The load order of plug-ins is determined both by their order of appearance in the <application>.provisioning file and the inter-plugin dependencies (dependencies are loaded earlier). We don't support the "Start Level" specification from OSGi (yet), so there is unfortunately no way to order the loading of unrelated plug-ins without tedious manual sorting in the .provisioning file. As you note, you might run into "soft dependency" issues, e.g. if your plug-in depends on org.mitk.gui.qt.common which requires a running workbench. This kind of problem can however be solved by depending on org.mitk.gui.common instead (most of the time).Unloading / reloading of plug-ins is a whole other topic usually not related to the things above.Best, Sascha On 12/08/2014 07:50 PM, Rostislav Khlebnikov wrote:Hello Ingmar,thanks! I guess the way to go (at least for now :)) is either a separate module or a plugin with eager activation policy for context-menu and similar things is the way to go. The whole load/unload/reload order of plugins is kinda a mystery to me - is there some documentation that is available for me to read on this?All best, Rostislav. On 04/12/2014 14:27, Ingmar Wegner wrote:Hi Rostislav, I have arranged it the following way:I have implemented some IO classes and some context menu actions in seperate modules. Then in my application plugin in my class <MyApp>_workbench_window_advisor.cpp I setup all the menu and action settings, registering additional reader and writer (I will rewrite this for 2014.10.0) and in my main of my application I call sbConfig->setString(berry::Platform::ARG_PRELOAD_LIBRARY, "liborg_mitk_gui_qt_ext:0.1"); to have the dependant MITK libs present when loading my application plugin. Without this call the application crashes during startup. This call has changed its syntax though in 2014.10.0 so I will adapt this in a little while (see http://mitk.org/wiki/MITK_ReleaseNotes_2014.10 section Breaking Changes).Best Regards, Ingmar *Gesendet:* Mittwoch, 03. Dezember 2014 um 22:58 Uhr *Von:* "Rostislav Khlebnikov" <[email protected]> *An:* [email protected] *Betreff:* Re: [mitk-users] Forcing plugin loading Just to kinda conclude: The way to force load a plugin: berry::Platform::GetCTKPlugin("PluginName")->start(ctkPlugin::START_TRANSIENT); Still I'm there's a problem: Imagine a plugin which adds context menu items, node descriptors for them and a view. Then if the activation policy is not eager - the data manager viewinitializes earlier than this plugin and it can't find node descriptorsfor context menu actions.If it is eager - we have the same problem with the QmitkCommonActivator(which I hope works fine in 2014.10). Rostislav. On 03/12/2014 15:42, Rostislav Khlebnikov wrote: > Just to make it more specific. >> The problem is that QmitkCommonActivator is started before Workbench is > created. Therefore, an error "BlueBerry Workbench not running!" is shown> and the QmitkViewCoordinator is not created. > This leads to QmitkImageNavigator not actually tracking the> opening/closing of render editor and once the display pane is closed,> user can move the navigation sliders and get a crash. >> Looks like, however, I was wrong regarding 2014.10 not helping me with> this behavior. Guess I will find a quick workaround before I do the > merge with 2014.10 - any help would be appreciated. > > Rostislav. > > On 03/12/2014 15:13, Rostislav Khlebnikov wrote: >> Hi guys, >> >> I am still working with 2014.03 release, but I doubt this has been >> changed in 2014.10, so I will ask my question.>> How can I force the plugin framework to load the plugins at start? The >> reason for this is that plugins initialize some writers and readers for >> my data types as well as some actions for the data manager - and I want>> them to be available without user having to open any views. >> I used to have plugin activation policy set to eager, but then the>> "normal" plugins were activated before my application plugin (the one >> that creates and runs workbench) which in turn led to activation of >> org.mitk.gui.qt.common which relies on workbench already being created.>> So all this led to problems when application was running.>> So I would like to have the "application plugin" force the loading of>> "normal plugins". Is there a way to do this? >> >> Thank you, >> Rostislav. >>>> ------------------------------------------------------------------------------>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server>> from Actuate! Instantly Supercharge Your Business Reports and Dashboards >> with Interactivity, Sharing, Native Excel Exports, App Integration & more >> Get technology previously reserved for billion-dollar corporations, FREE >> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk>> _______________________________________________ >> mitk-users mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/mitk-users >> ------------------------------------------------------------------------------> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server> from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk> _______________________________________________ > mitk-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/mitk-users ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Serverfrom Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREEhttp://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk _______________________________________________ mitk-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mitk-users------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk _______________________________________________ mitk-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mitk-users------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk _______________________________________________ mitk-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mitk-users
------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________ mitk-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mitk-users
