void (@NotNull PsiReferenceExpression expression) { super.visitReferenceExpression(expression); if (expression.getQualifierExpression() != null) { // optimization // references to parameters are never qualified return; } final PsiElement target = expression.resolve(); if (!(target instanceof PsiParameter parameter)) { return; } parameters.remove(parameter); if (parameters.isEmpty()) { stopWalking(); } }