lable
  private HighlightInfo.Builder checkSealedClassCompleteness(@NotNull PsiType selectorType,
                                                             @NotNull List<? extends PsiCaseLabelElement> elements) {
    Set<PsiClass> missedClasses;
    List<PatternDescription> descriptions = preparePatternDescription(elements);
    List<PsiEnumConstant> enumConstants = StreamEx.of(elements).map(element -> getEnumConstant(element)).nonNull().toList();
    List<PsiClass> missedSealedClasses =
      StreamEx.of(findMissedClasses(selectorType, descriptions, enumConstants, myBlock).missedClasses())
        .sortedBy(t -> t.getQualifiedName())
        .toList();
    missedClasses = new LinkedHashSet<>();
    //if T is intersection types, it is allowed to choose any of them to cover
    for (PsiClass missedClass : missedSealedClasses) {
      PsiClassType missedClassType = TypeUtils.getType(missedClass);
      if (cover(mySelector, missedClassType, selectorType)) {
        missedClasses.clear();
        missedClasses.add(missedClass);
        break;
      }
      else {
        missedClasses.add(missedClass);
      }
    }
    if (missedClasses.isEmpty()) return null;
    HighlightInfo.Builder info = createCompletenessInfoForSwitch(!elements.isEmpty());
    List<String> allNames = collectLabelElementNames(elements, missedClasses);
    Set<String> missingCases = ContainerUtil.map2LinkedSet(missedClasses, PsiClass::getQualifiedName);
    IntentionAction fix = getFixFactory().createAddMissingSealedClassBranchesFix(myBlock, missingCases, allNames);
    info.registerFix(fix, null, null, null, null);
    return info;
  }


 
lable
  private HighlightInfo.Builder checkSealedClassCompleteness(@NotNull PsiType selectorType,
                                                             @NotNull List<? extends PsiCaseLabelElement> elements) {
 