@Override
      public void rootsChanged(@NotNull ModuleRootEvent event) {
        if (beforeCalled == 0) {
          return; // This may occur if listener has been added between beforeRootsChange() and rootsChanged() calls.
        }

        if (--beforeCalled == 0) {
          resume();
          restartTimer();
        }
      }
@Override
      public void rootsChanged(@NotNull ModuleRootEvent event)