static void removeListenerOfClass(@NotNull Tree tree, @NotNull Class<?> listenerClass) {
    TreeSelectionListener[] listeners = tree.getTreeSelectionListeners();

    for (TreeSelectionListener listener : listeners) {
      if (listenerClass.isInstance(listener)) {
        tree.removeTreeSelectionListener(listener);
      }
    }
  }
static void removeListenerOfClass(@NotNull Tree tree, @NotNull Class<?> listenerClass)