private static @NotNull FList<ProviderData> runSnapshotRules(@NotNull MySink sink,
                                                               @Nullable Component component,
                                                               @NotNull FList<ProviderData> cachedData) {
    boolean noMap = sink.map == null;
    DataSnapshot snapshot = new DataSnapshot() {
      /** @noinspection unchecked */
      @Override
      public <T> @Nullable T get(@NotNull DataKey<T> key) {
        if (key == PlatformCoreDataKeys.CONTEXT_COMPONENT) return (T)component;
        for (ProviderData map : cachedData) {
          Object answer = map.uiSnapshot.get(key.getName());
          if (answer != null) {
            return answer == EXPLICIT_NULL ? null : (T)answer;
          }
        }
        return null;
      }
    };
    UiDataRule.forEachRule(o -> {
      Object prev = sink.source;
      sink.source = o;
      sink.cachedDataForRules = cachedData;
      try {
        o.uiDataSnapshot(sink, snapshot);
      }
      finally {
        sink.cachedDataForRules = null;
        sink.source = prev;
      }
    });
    return noMap && sink.map != null ? cachedData.prepend(sink.map) : cachedData;
  }
private static @NotNull FList<ProviderData> runSnapshotRules(@NotNull MySink sink,
                                                               @Nullable Component component,
                                                               @NotNull FList<ProviderData> cachedData)