/**
   * Updates the allowable resolver factories to only the ones that are allowable given the {@code
   * visualItems} and the current {@link Slot}.
   *
   * <p>This must be called at least once to initialize the mapping and the currentResolver.
   *
   * <p>If the resolver can not resolve the set of view items, it will automatically be changed to
   * null
   */
  public void updateAllowableFactories(LightweightCollection<VisualItem> visualItems) {

    assert visualItems != null;
    allowableResolverFactories.clear();

    // if (currentResolver != null
    // && !currentResolver.canResolve(slot, resourceSets, null)) {
    // // Uh Oh the current resolver is bad, can we do something here?
    // // TODO handle this elsewhere, update slots should be called on this
    // // slot
    // }

    LightweightCollection<VisualItemValueResolverFactory> allFactories = provider.getAll();

    assert allFactories != null;

    for (VisualItemValueResolverFactory factory : allFactories) {
      if (factory.canCreateApplicableResolver(slot, visualItems)) {
        allowableResolverFactories.put(factory.getId(), factory);
      }
    }
  }
 public VisualItemValueResolverFactory getCurrentFactory() {
   return provider.get(getCurrentResolver().getId());
 }