private void updateTreeIfShown(@NotNull Consumer<? super ShelfTree> treeConsumer) {
    if (myPanel != null) {
      treeConsumer.consume(myPanel.myTree);
    }
  }
private void updateTreeIfShown(@NotNull Consumer<? super ShelfTree> treeConsumer)