PlugInFrame and WindowManager



Hi all,
I’m a C++ programmer and new in IJ Plugin development (with a little experience in the Java programming);
Could someone help me to understand why WindowManager does not list me the running PlugInFrame ?
In particular, I wrote a plugin to read my data structure to be used to process an image stack (using another plugin I wrote). Therefore I should list the list of currently open stacks (and I do it without problems with WindowManager.getIDList()) and the list of plugin frames. I tried doing it with getNonImageWindows (), but the function always returns an empty list (size = 0); furthermore, if I try to close all open windows (using WindowManager.closeAllWindows ()) and the plugin close all the images windows but not my pluginframe.

Tthanks in advance for any help.


Dear @thefonzy,

You have to register your PlugInFrame manually with the WindowManager: WindowManager.addWindow(myPlugInFrame); should do the trick.



dear @stelfrich
thank you very much for your answer.
I solved with an iteration on the windows class:

for (Window w : Window.getWindows()) {
    if (w != null && (w instanceof cmsx_reader_)) {
        C_cmsx_reader= (cmsx_reader_) w;

As soon as possible I will try your solution, which could certainly be more effective.