private String @NotNull [] getUpToDateLines() {
    return ReadAction.compute(() -> {
      final int lineCount = myDocument.getLineCount();
      final String[] lines = new String[lineCount];
      final CharSequence chars = myDocument.getCharsSequence();
      for (int i = 0; i < lineCount; i++) {
        lines[i] = chars.subSequence(myDocument.getLineStartOffset(i), myDocument.getLineEndOffset(i)).toString();
      }
      return lines;
    });
  }
private String @NotNull [] getUpToDateLines()