@Override
  public void uiDataSnapshot(@NotNull DataSink sink) {
    TreePath[] paths = getSelectionPaths();
    Object[] selectedUserObjects =
      paths == null ? ArrayUtil.EMPTY_OBJECT_ARRAY :
      ArrayUtil.toObjectArray(ContainerUtil.map(paths, TreeUtil::getLastUserObject));
    Object[] singleSelectedPathUserObjects =
      paths == null || paths.length != 1 ? null :
      ArrayUtil.toObjectArray(ContainerUtil.map(paths[0].getPath(), TreeUtil::getUserObject));

    sink.set(PlatformCoreDataKeys.BGT_DATA_PROVIDER,
             dataId -> getSlowDataFromSelection(
               selectedUserObjects, singleSelectedPathUserObjects, dataId));

    if (paths != null) {
      ArrayList<Navigatable> navigatables = new ArrayList<>();
      for (TreePath path : paths) {
        Object node = path.getLastPathComponent();
        Object userObject = TreeUtil.getUserObject(node);
        if (userObject instanceof Navigatable o) {
          navigatables.add(o);
        }
        else if (node instanceof Navigatable o) {
          navigatables.add(o);
        }
        else if (userObject instanceof CachedTreePresentationNode o) {
          navigatables.add(new CachedNodeNavigatable(myProject, o));
        }
      }
      sink.set(CommonDataKeys.NAVIGATABLE_ARRAY,
               navigatables.isEmpty() ? null : navigatables.toArray(Navigatable.EMPTY_NAVIGATABLE_ARRAY));
    }
    if (myTreeStructure instanceof AbstractTreeStructureBase treeStructure) {
      //noinspection unchecked
      List<AbstractTreeNode<?>> selection = (List)ContainerUtil.filterIsInstance(
        selectedUserObjects, AbstractTreeNode.class);
      DataSink.uiDataSnapshot(sink, o -> treeStructure.getDataFromProviders(selection, o));
    }
    sink.set(CommonDataKeys.PROJECT, myProject);
    sink.set(PlatformCoreDataKeys.SELECTED_ITEMS, selectedUserObjects);
    sink.set(PlatformDataKeys.LAST_ACTIVE_FILE_EDITOR,
             FileEditorManagerEx.getInstanceEx(myProject).getSelectedEditor());
    sink.set(PlatformDataKeys.TREE_EXPANDER, getTreeExpander());
  }
@Override
  public void uiDataSnapshot(@NotNull DataSink sink)