void (XPathFunction function, @NotNull ParameterInfoUIContext context) { final Function declaration = function.getDeclaration(); if (declaration != null) { if (declaration.getParameters().length > 0) { final String signature = declaration.buildSignature(); final int length = declaration.getName().length(); final String hint = signature.substring(length + 1, signature.length() - 1); final int currentParameterIndex = context.getCurrentParameterIndex(); if (currentParameterIndex < 0 || currentParameterIndex >= declaration.getParameters().length) { context.setupUIComponentPresentation(hint, -1, -1, false, false, false, context.getDefaultParameterColor()); } else { final String[] ps = hint.split(","); final TextRange[] ts = new TextRange[ps.length]; int start = 0; for (int i = 0; i < ps.length; i++) { String p = ps[i]; ts[i] = TextRange.from(start, p.length()); start += p.length() + 1; } final TextRange range = ts[currentParameterIndex]; context.setupUIComponentPresentation(hint, range.getStartOffset(), range.getEndOffset(), false, false, false, context.getDefaultParameterColor()); } } else { context.setupUIComponentPresentation(noParamsMessage(), -1, -1, false, false, false, context.getDefaultParameterColor()); } } }