public static void deleteLabelElement(@NotNull Project project, @NotNull PsiCaseLabelElement labelElement) {
    PsiSwitchLabelStatementBase label = PsiImplUtil.getSwitchLabel(labelElement);
    if (label == null) return;
    PsiCaseLabelElementList labelElementList = label.getCaseLabelElementList();
    if (labelElementList != null) {
      if (labelElementList.getElementCount() == 1) {
        deleteLabel(label);
        return;
      }
      else if (labelElementList.getElementCount() == 2) {
        PsiElement defaultElement = SwitchUtils.findDefaultElement(label);
        if (defaultElement != null && defaultElement != labelElement) {
          assert PsiKeyword.CASE.equals(label.getFirstChild().getText()) && defaultElement instanceof PsiDefaultCaseLabelElement;
          makeLabelDefault(label, project);
          return;
        }
      }
    }
    new CommentTracker().deleteAndRestoreComments(labelElement);
  }
public static void deleteLabelElement(@NotNull Project project, @NotNull PsiCaseLabelElement labelElement)