@NotNull
  public String getText(@NotNull PsiElement match, int start, int end) {
    final String matchText = match.getText();
    if (start == 0 && end == -1) return matchText;
    return matchText.substring(start, end == -1 ? matchText.length() : end);
  }
@NotNull
  public String getText(@NotNull PsiElement match, int start, int end)