Listener for ToolWindowManager



I'm working on plugin which starting thread with receiving messages. Thread is created during applicationComponent init and then work independently.

As receiver for all this messages I count with my toolWindow implementation but problem is that I'm not able get its instance till is ready. Is any way how to register for notification when toolWindow is available ?

I did tried create projectComponent and get instance when project is opened but toolWindowManager is produce null.

1 comment
Permanently deleted user

In your projectComponent try this:

  public void projectOpened() {
    myToolWindow =
      ToolWindowManager.getInstance(myProject).registerToolWindow(TOOL_WINDOW_ID, ...)

    StartupManager.getInstance(myProject).registerPostStartupActivity(new Runnable() {
      public void run() {
        //Try to use your toolwindow


Please sign in to leave a comment.