public static @Nullable AlignmentImpl getAlignment(final @NotNull AbstractBlockWrapper block) {
    AbstractBlockWrapper current = block;
    while (true) {
      AlignmentImpl alignment = current.getAlignment();
      if (alignment == null || alignment.getOffsetRespBlockBefore(block) == null) {
        current = current.getParent();
        if (current == null || current.getStartOffset() != block.getStartOffset()) {
          return null;
        }
      }
      else {
        return alignment;
      }
    }
  }
public static @Nullable AlignmentImpl getAlignment(final @NotNull AbstractBlockWrapper block)