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

        boolean visible = ((ToolWindowManagerEx)toolWindowManager).shouldUpdateToolWindowContent(myToolWindow);
        if (!visible || wasVisible) {
          wasVisible = visible;
          if (!visible) {
            scheduleStructureCleanupCache();
          }
          return;
        }

        scheduleStructureUpdate();
        wasVisible = true;
      }
@Override
      public void stateChanged(@NotNull ToolWindowManager toolWindowManager)