private static boolean isSequenceOfDots(@NotNull PsiElement contextElement) {
    return StreamEx
      .iterate(contextElement, PsiElement::getPrevSibling)
      .takeWhile(Objects::nonNull)
      .limit(3)
      .allMatch(psi -> psi instanceof PsiErrorElement || psi.textMatches("."));
  }
private static boolean isSequenceOfDots(@NotNull PsiElement contextElement)