@Override
      public void stateChanged(@NotNull ToolWindowManager toolWindowManager) {
        if (toolWindow.isDisposed()) {
          return;
        }

        boolean visible = ((ToolWindowManagerEx)toolWindowManager).shouldUpdateToolWindowContent(toolWindow);
        if (!visible || wasVisible) {
          return;
        }
        scheduleStructureUpdate();
        wasVisible = true;
      }
@Override
      public void stateChanged(@NotNull ToolWindowManager toolWindowManager)