List<TextRange> (@NotNull PsiElement e, @NotNull CharSequence editorText, int cursorOffset, @NotNull Editor editor) { if (!(e instanceof PsiExpressionList expressionList)) { return Collections.emptyList(); } final PsiParameterList parameterList = getParameterList(expressionList); if (parameterList == null) { return Collections.emptyList(); } final PsiExpression[] varargArgs = getVarargArgs(parameterList, expressionList); if (varargArgs.length == 0) { return Collections.emptyList(); } final TextRange firstExpressionRange = varargArgs[0].getTextRange(); final TextRange lastExpressionRange = varargArgs[varargArgs.length - 1].getTextRange(); return Collections.singletonList(new TextRange(firstExpressionRange.getStartOffset(), lastExpressionRange.getEndOffset())); }