ToolWindow implementation

Hi,

How can one activate/deactivate/show/hide toolwindow from my code (not useing mouse click). I have a plugin which uses one tool window docking by default on left (or right) and one tool window docking at bottom. I need to show/hide the second one (which implements a console) whenever I perform an action from the first one. In ToolWindow interface there is a method

public void show(Runnable); ,

but what runnable is expected there.

Finally this seams not to be the proper way to do what I need. Could someone advise me, how to do it, please?

Thanks!

Pavlin

1 comment
Comment actions Permalink

Hi,

Finally this seams not to be the proper way to do what I need.


It's 100% valid method. Since show() method is asyncrhonous (i.e. you can't
assume that window is visible right after calling show) you can a runnable,
which will be executed in Swing thread when the window was actually shown.

--
Best regards,
Mike Aizatsky.
-


JetBrains, Inc / IntelliJ Software
http://www.intellij.com
"Develop with pleasure!"


0

Please sign in to leave a comment.