@Override
  protected TextRange getOccurrenceRange(Object occurrence) {
    if (occurrence instanceof PsiElement) {
      return ((PsiElement)occurrence).getTextRange();
    }
    else if (occurrence instanceof StringPartInfo) {
      return ((StringPartInfo)occurrence).getRange();
    }
    else {
      return null;
    }
  }
@Override
  protected TextRange getOccurrenceRange(Object occurrence)