List<PsiField> (@NotNull PsiField field) { List<PsiField> fields = new ArrayList<>(); fields.add(field); PsiElement next = getNextAfterWsOrComment(field); while (next != null && PsiUtil.isJavaToken(next, JavaTokenType.COMMA)) { next = getNextAfterWsOrComment(next); if (next instanceof PsiField) { fields.add((PsiField)next); } else { break; } next = getNextAfterWsOrComment(next); } return fields; }