private static TextRange computeRange(@NotNull PsiElement element) {
    if (element instanceof PsiNewExpression) {
      PsiJavaCodeReferenceElement reference = ((PsiNewExpression)element).getClassReference();
      if (reference != null) {
        return reference.getTextRange();
      }
    }
    if (element instanceof PsiEnumConstant) {
      return ((PsiEnumConstant)element).getNameIdentifier().getTextRange();
    }
    if (element instanceof PsiMethodCallExpression) {
      PsiElement nameElement = ((PsiMethodCallExpression)element).getMethodExpression().getReferenceNameElement();
      if (nameElement != null) {
        return nameElement.getTextRange();
      }
    }
    return HighlightMethodUtil.getFixRange(element);
  }
private static TextRange computeRange(@NotNull PsiElement element)