private static PsiElement @NotNull [] getBody(@NotNull PsiSwitchLabelStatementBase switchLabelStatement) {
    final List<PsiElement> result = new SmartList<>();
    if (switchLabelStatement instanceof PsiSwitchLabeledRuleStatement) {
      final PsiStatement body = ((PsiSwitchLabeledRuleStatement)switchLabelStatement).getBody();
      if (body instanceof PsiBlockStatement) {
        result.addAll(PsiTreeUtil.getChildrenOfAnyType(((PsiBlockStatement)body).getCodeBlock(), PsiStatement.class, PsiComment.class));
      }
      else {
        result.add(body);
      }
    }
    else {
      PsiElement sibling = PsiTreeUtil.getNextSiblingOfType(switchLabelStatement, PsiStatement.class);
      while (sibling != null && !(sibling instanceof PsiSwitchLabelStatement)) {
        if (sibling instanceof PsiStatement || sibling instanceof PsiComment) {
          result.add(sibling);
        }
        sibling = sibling.getNextSibling();
      }
    }
    return result.toArray(PsiElement.EMPTY_ARRAY);
  }
private static PsiElement @NotNull [] getBody(@NotNull PsiSwitchLabelStatementBase switchLabelStatement)