@Override
  public @NotNull String getText(@NotNull TextRange range) {
    try {
      final Document document = myTextComponent.getDocument();
      return document.getText(range.getStartOffset(), range.getLength());
    }
    catch (BadLocationException e) {
      throw new RuntimeException(e);
    }
  }
@Override
  public @NotNull String getText(@NotNull TextRange range)