code: public static <V,T extends Throwable> V whileUpdatingByXml(Callable<V,T> callable) throws T {
          updatingByXml.set(true);
          try {
              return callable.call();
          } finally {
              updatingByXml.set(false);
          }
      }
docs: Runs a block while making {@link #currentlyUpdatingByXml} be temporarily true.
  Use this when you are creating or changing an item.
  @param <V> a return value type (may be {@link Void})
  @param <T> an error type (may be {@link Error})
  @param callable a block, typically running {@link #load} or {@link Item#onLoad}
  @return whatever {@code callable} returned
  @throws T anything {@code callable} throws
  @since 1.546