PsiElement[] (@NotNull PsiElement referenceElement) { PsiElement expression = referenceElement.getParent(); if (expression == null) return null; List<PsiElement> arguments = new ArrayList<>(); for (PsiElement e = expression.getNextSibling(); e != null; e = e.getNextSibling()) { if (e instanceof PsiComment || e instanceof LeafPsiElement) continue; arguments.add(e); } if (arguments.isEmpty()) { return null; } return arguments.toArray(PsiElement.EMPTY_ARRAY); }