@Nullable
    SortableList readEntries(@NotNull C context) {
      SortingStrategy strategy = null;
      PsiElement current = getFirst(context);
      List<PsiElement> beforeFirst = new SmartList<>();
      outer:
      while (current != null && !isEnd(current)) {
        for (SortingStrategy currentStrategy : sortStrategies()) {
          if (currentStrategy.isSuitableEntryElement(current)) {
            strategy = currentStrategy;
            break outer;
          }
        }
        beforeFirst.add(current);
        current = current.getNextSibling();
      }
      if (strategy == null) return null;

      ReadStateMachine sm = new ReadStateMachine(current, strategy, this);
      if (sm.run()) return null;

      List<SortableEntry> entries = sm.mySortableEntries;
      List<PsiElement> entryElements = ContainerUtil.map(entries, e -> e.myElement);
      if (entryElements.size() < MIN_ELEMENTS_COUNT) return null;
      if (!strategy.isSuitableElements(entryElements)) return null;
      // in case when element after last sortable entry is an error element
      // all comments until the end were glued to this entry,
      // so now we need to remove them in order to avoid duplication
      SortableEntry last = entries.get(entries.size() - 1);
      if (last.myElement.getNextSibling() instanceof PsiErrorElement) {
        last.myAfterSeparator.clear();
      }
      return new SortableList(entries, strategy, sm.myLineLayout, beforeFirst);
    }
@Nullable
    SortableList readEntries(@NotNull C context)