private static @NotNull TextRange getDeclarationRangeFromPsi(@NotNull PsiElement declaredElement, @NotNull PsiElement declaringElement) {
    PsiElement identifyingElement = getIdentifyingElement(declaredElement);
    if (identifyingElement == null) {
      return rangeOf(declaringElement);
    }
    TextRange identifyingRange = relateRange(identifyingElement, rangeOf(identifyingElement), declaringElement);
    if (identifyingRange == null) {
      return rangeOf(declaringElement);
    }
    return identifyingRange;
  }
private static @NotNull TextRange getDeclarationRangeFromPsi(@NotNull PsiElement declaredElement, @NotNull PsiElement declaringElement)