Hi Stefan, After looking at it a bit more after I sent the e-mail, you're right that I was mixing up plugins and modules. Thanks, I understand this setup better now.
The VIEW_ID is set properly, and as far as I can tell, my project is doing everything the project template is doing. Can anyone give me more information on how the plugins are discovered, e.g., - Are there any hard coded paths, or anything that needs to be added to PATH to allow MITK to discover plugins? - Does MITK actually iterate over every dll in a directory looking for plugins? - I notice a .provisioning file was generated, it looks like it contains a list of dlls relative to some variable "@EXECUTABLE_DIR" -- I am wondering if EXECUTABLE_DIR is set correctly. - It looks like the plugins list is just internally a map of strings to types in the plugin dll itself, I am not quite sure how our main program (also a plugin) knows about other plugins. Does MITK inspect the symbols of other dlls and try and literally find the VIEW_ID? Thanks, - Alex On Mon, Mar 9, 2020 at 4:49 AM Dinkelacker, Stefan < s.dinkelac...@dkfz-heidelberg.de> wrote: > Hi Alex, > > > > I think you mixed up two different things here. While MITK plugins do come > with CppMicroServices support, it has nothing to do with the plugin > registration. MITK is using the CTK plugin framework for this [1]. BTW you > can always look into the MITK/CMake directory to find the code behind MITK > CMake functions/macros like mitkFunctionCreatePlugin.cmake that basically > wraps ctkMacroBuildPlugin. > > > > There are many things that can go wrong, so it’s impossible to tell you > exactly what’s going on in your case but when searching for source files > containing PartInitException and “Could not create view” I end up with > three candidates in org.blueberry.ui.qt where I would recommend to place > break points to debug the issue. > > > > General plugin-related hints that are not the most obvious ones: > > > > - Start your application with the /BlueBerry.clean (Windows) or > –BlueBerry.clean (Linux, macOS) argument to force a clean start (takes > longer but it is a better base for debugging these kinds of plugin issues). > Sometimes that’s already all that’s necessary (to do It once). > > - Did you declare AND define a VIEW_ID in your View class, if your > plugin contains any? > > > > Although tailored for 2018.04, the exampleplugin is a good minimum example > with comments to carefully look through and compare everything to a working > plugin [2]. > > > > Best, > > Stefan > > > > [1] http://www.commontk.org/index.php/Documentation/Plugin_Framework > > [2] > https://github.com/MITK/MITK-ProjectTemplate/tree/master/Plugins/org.mitk.gui.qt.exampleplugin > > > > > > *From:* Alex Melville [mailto:amelv...@umich.edu] > *Sent:* Friday, March 6, 2020 9:44 PM > *To:* mitk-users@lists.sourceforge.net > *Subject:* [mitk-users] mitk_create_plugin and C++ Microservices > > > > Hello, > > > > Background: > > > > - I have a plugin that I'm maintaining that calls mitk_create_plugin, but > it doesn't seem like its views are getting registered. We're getting errors > of the form "Could not create view: <viewName>", "Caused by: Part > initialization error: Could not create view: <viewName>" even though the > dll containing the view seems to be in the right directory. > > > > - Based on that, I have to conclude that the code for the C++ > microservices (documented here: > http://docs.mitk.org/nightly/MicroServices_TheModuleContext.html ) is not > getting added to our code. I tried grepping the build directory for > functions related to registering modules, but nothing came back. > ModuleRegistry showed only GetModule(). > > > > - Looking at MITK-ProjectTemplate (v2016.11), it looks like the sample > plugins don't need to call anything other than mitk_create_plugin. So based > on that, I'd guess that the microservices pre-processing should happen > automatically for plugins, but I wanted to make sure. > > > > Questions: > > - Does mitk_create_plugin automatically preprocess the files to add the > Register / etc. functions? > > - If it should, any advice on what else can cause views of plugins to not > be found would be appreciated > > > > Are there any more details on how the micro services system works? > > - Is there one registry for the entire system (like e.g., COM/DCOM) or one > per application? > > - Where is this microservices registry stored? Or is it not stored > anywhere and instead it's re-populated every time the application starts? > > > > Thanks, > > > > - Alex > > > > > > >
_______________________________________________ mitk-users mailing list mitk-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mitk-users