private @Nullable WrapImpl getWrapToBeUsed(final List<? extends WrapImpl> wraps, LeafBlockWrapper currentBlock) {
    if (wraps.isEmpty()) {
      return null;
    }
    if (myWrapCandidate == currentBlock) return wraps.get(0);

    for (final WrapImpl wrap : wraps) {
      if (!isSuitableInTheCurrentPosition(wrap, currentBlock)) continue;
      if (wrap.isActive()) return wrap;

      final WrapImpl.Type type = wrap.getType();
      if (type == WrapImpl.Type.WRAP_ALWAYS) return wrap;
      if (type == WrapImpl.Type.WRAP_AS_NEEDED || type == WrapImpl.Type.CHOP_IF_NEEDED) {
        if (lineOver(currentBlock)) {
          return wrap;
        }
      }
    }
    return null;
  }
private @Nullable WrapImpl getWrapToBeUsed(final List<? extends WrapImpl> wraps, LeafBlockWrapper currentBlock)