public static void uiSnapshotForList(@NotNull JList<?> list, @NotNull DataSink sink) {
    int index = list.getSelectedIndex();
    sink.set(PlatformCoreDataKeys.SELECTED_ITEM, index > -1 ? list.getSelectedValue() : ObjectUtils.NULL);

    Object[] values = list.getSelectedValues();
    for (int i = 0; i < values.length; i++) {
      if (values[i] == null) {
        values[i] = ObjectUtils.NULL;
      }
    }
    sink.set(PlatformCoreDataKeys.SELECTED_ITEMS, values);
  }
public static void uiSnapshotForList(@NotNull JList<?> list, @NotNull DataSink sink)