@Nullable
  private static PsiElement findElementInRange(@NotNull PsiFile file, @NotNull TextRange range) {
    PsiElement left = file.findElementAt(range.getStartOffset());
    if (left == null) return null;
    PsiElement right = file.findElementAt(range.getEndOffset() - 1);
    if (right == null) return null;
    return PsiTreeUtil.findCommonParent(left, right);
  }
@Nullable
  private static PsiElement findElementInRange(@NotNull PsiFile file, @NotNull TextRange range)