@Override
  public void uiDataSnapshot(@NotNull DataSink sink) {
    super.uiDataSnapshot(sink);
    JTree tree = getCurrentTree();
    HierarchyNodeDescriptor[] selection = getSelectedDescriptors();

    sink.set(PlatformDataKeys.TREE_EXPANDER, tree == null ? null : new DefaultTreeExpander(tree));
    sink.set(PlatformCoreDataKeys.SELECTED_ITEMS, selection);

    sink.lazy(CommonDataKeys.PSI_ELEMENT, () -> {
      PsiElement anElement = selection.length > 0 ? getElementFromDescriptor(selection[0]) : null;
      return anElement != null && anElement.isValid() ? anElement : null;
    });
    sink.lazy(PlatformCoreDataKeys.PSI_ELEMENT_ARRAY, () -> {
      return JBIterable.of(selection).filterMap(this::getElementFromDescriptor).toArray(PsiElement.EMPTY_ARRAY);
    });
    sink.lazy(CommonDataKeys.NAVIGATABLE, () -> {
      HierarchyNodeDescriptor descriptor = selection.length > 0 ? selection[0] : null;
      if (descriptor == null) return null;
      return getNavigatable(descriptor);
    });
    sink.lazy(CommonDataKeys.NAVIGATABLE_ARRAY, () -> {
      return JBIterable.of(selection).filterMap(this::getNavigatable).toArray(Navigatable.EMPTY_NAVIGATABLE_ARRAY);
    });
  }
@Override
  public void uiDataSnapshot(@NotNull DataSink sink)