private boolean shouldHighlight(@NotNull PsiIfStatement ifStatement,
                                    @NotNull PsiExpression switchExpression,
                                    @NotNull Set<Object> switchCaseValues) {
      final PsiType type = switchExpression.getType();
      if (!suggestIntSwitches) {
        if (type instanceof PsiClassType) {
          if (type.equalsToText(CommonClassNames.JAVA_LANG_INTEGER) ||
              type.equalsToText(CommonClassNames.JAVA_LANG_SHORT) ||
              type.equalsToText(CommonClassNames.JAVA_LANG_BYTE) ||
              type.equalsToText(CommonClassNames.JAVA_LANG_CHARACTER)) {
            return false;
          }
        }
        else if (PsiTypes.intType().equals(type) || PsiTypes.shortType().equals(type) || PsiTypes.byteType().equals(type) || PsiTypes.charType()
          .equals(type)) {
          return false;
        }
      }
      if (type instanceof PsiClassType) {
        if (!suggestEnumSwitches && TypeConversionUtil.isEnumType(type)) {
          return false;
        }
        Nullability nullability = getNullability(switchExpression);
        if (PsiUtil.isAvailable(JavaFeature.PATTERNS_IN_SWITCH, switchExpression) &&
            !ClassUtils.isPrimitive(switchExpression.getType())) {
          if (hasDefaultElse(ifStatement) || findNullCheckedOperand(ifStatement) != null) {
            nullability = Nullability.NOT_NULL;
          }
        }
        if (nullability == Nullability.NULLABLE) {
          return false;
        }
        if (onlySuggestNullSafe && nullability != Nullability.NOT_NULL) {
          return false;
        }
      }
      int countUnconditionalPatterns = SwitchUtils.countUnconditionalPatterns(switchExpression, switchCaseValues);
      if (hasDefaultElse(ifStatement)) {
        countUnconditionalPatterns++;
      }
      if (countUnconditionalPatterns > 1) return false;
      return !SideEffectChecker.mayHaveSideEffects(switchExpression);
    }
private boolean shouldHighlight(@NotNull PsiIfStatement ifStatement,
                                    @NotNull PsiExpression switchExpression,
                                    @NotNull Set<Object> switchCaseValues)