@Override
  public void uiDataSnapshot(@NotNull DataSink sink) {
    super.uiDataSnapshot(sink);
    sink.set(ResourceBundle.ARRAY_DATA_KEY, new ResourceBundle[]{myResourceBundle});

    JBIterable<Object> selection = JBIterable.of(getTree().getSelectionPaths()).map(TreeUtil::getLastUserObject);
    sink.set(PlatformDataKeys.DELETE_ELEMENT_PROVIDER, new MyDeleteProvider());
    sink.set(PlatformDataKeys.COPY_PROVIDER, new MyCopyProvider());
    sink.lazy(CommonDataKeys.VIRTUAL_FILE, () -> {
      return new ResourceBundleAsVirtualFile(myResourceBundle);
    });
    sink.lazy(IProperty.ARRAY_KEY, () -> {
      List<IProperty> list = selection
        .filterMap(StructureViewComponent::unwrapWrapper)
        .filter(ResourceBundleEditorViewElement.class)
        .flatten(o -> JBIterable.of(o.getProperties()))
        .toList();
      return list.isEmpty() ? null : list.toArray(IProperty.EMPTY_ARRAY);
    });
    sink.lazy(PlatformCoreDataKeys.PSI_ELEMENT_ARRAY, () -> {
      List<PsiElement> list = getPsiElements(selection);
      return list.toArray(PsiElement.EMPTY_ARRAY);
    });
    sink.lazy(UsageView.USAGE_TARGETS_KEY, () -> {
      List<PsiElement> chosenElements = getPsiElements(selection);
      if (chosenElements.isEmpty()) return null;
      return ContainerUtil.map2Array(
        chosenElements, UsageTarget.EMPTY_ARRAY,
        o -> new PsiElement2UsageTargetAdapter(o, true));
    });
  }
@Override
  public void uiDataSnapshot(@NotNull DataSink sink)