private void ensureSubscribedToModel() {
    if (modelListener != null) {
      return;
    }
    var modelListener = TreeModelAdapter.create(this::processModelEvent);
    model.addTreeModelListener(modelListener);
    this.modelListener = modelListener;
  }
private void ensureSubscribedToModel()