@Override
    public <T> void set(@NotNull DataKey<T> key, @Nullable T data) {
      if (data == null) return;
      if (key == PlatformCoreDataKeys.CONTEXT_COMPONENT ||
          key == PlatformCoreDataKeys.IS_MODAL_CONTEXT ||
          key == PlatformDataKeys.MODALITY_STATE) {
        return;
      }
      //noinspection unchecked
      T validated =
        data == EXPLICIT_NULL ? data :
        key == PlatformCoreDataKeys.BGT_DATA_PROVIDER ? (T)CompositeDataProvider.compose(
          (DataProvider)data, map == null ? null : ObjectUtils.tryCast(
            map.uiSnapshot.get(key.getName()), DataProvider.class)) :
        (T)DataValidators.validOrNull(data, key.getName(), source);
      if (validated == null) return;
      if (map == null) map = new ProviderData();
      if (cachedDataForRules != null && key != PlatformCoreDataKeys.BGT_DATA_PROVIDER) {
        for (ProviderData map : cachedDataForRules) {
          if (map.uiSnapshot.get(key.getName()) != null) {
            return;
          }
        }
      }
      map.uiSnapshot.put(key.getName(), validated);
      if (key == CommonDataKeys.EDITOR && validated != EXPLICIT_NULL) {
        map.uiSnapshot.put(CommonDataKeys.EDITOR_EVEN_IF_INACTIVE.getName(), validated);
      }
    }
@Override
    public <T> void set(@NotNull DataKey<T> key, @Nullable T data)