public boolean isReadOnly(@NotNull TextRange range) {
    return range.getStartOffset() > formattingRange.getEndOffset() || range.getEndOffset() < formattingRange.getStartOffset();
  }
public boolean isReadOnly(@NotNull TextRange range)