@NotNull
  private static LookupElement createQualifierLookupElement(@NotNull PsiClass qualifierClass,
                                                            @NotNull ChainCompletionContext context) {
    PsiClassType type = JavaPsiFacade.getElementFactory(qualifierClass.getProject()).createType(qualifierClass);
    PsiNamedElement element = context.getQualifierIfPresent(type);
    if (element == null) {
      return new ChainCompletionNewVariableLookupElement(qualifierClass, context);
    } else {
      if (element instanceof PsiVariable var) {
        return new VariableLookupItem(var);
      }
      else if (element instanceof PsiMethod method) {
        return createMethodLookupElement(method);
      }
      throw new AssertionError("unexpected element: " + element);
    }
  }
@NotNull
  private static LookupElement createQualifierLookupElement(@NotNull PsiClass qualifierClass,
                                                            @NotNull ChainCompletionContext context)