void (@NotNull GrCodeReferenceElement reference) { super.visitCodeReferenceElement(reference); if (reference.getQualifier() == null) { final PsiElement resolved = reference.resolve(); if (resolved instanceof PsiTypeParameter typeParameter) { if (PsiTreeUtil.isAncestor(typeParameter.getOwner(), element, false)) { used.add(typeParameter); } } } }