void (@NotNull PsiMethod method) { if (!method.getName().startsWith("add") || method.getParameterList().getParametersCount() != 1) return; final PsiParameter parameter = method.getParameterList().getParameters()[0]; final PsiType type = parameter.getType(); if (!(type instanceof PsiClassType classType)) return; final PsiClass listenerClass = classType.resolve(); if (listenerClass == null) return; final PsiMethod[] listenerMethods = listenerClass.getMethods(); if (!InheritanceUtil.isInheritorOrSelf(listenerClass, myEventListener, true)) return; for (PsiMethod listenerMethod : listenerMethods) { final String name = listenerMethod.getName(); if (myPropertyNames.add(name)) { LookupElementBuilder builder = LookupElementBuilder .create(generatePropertyElement(name, listenerMethod, null), name) .withIcon(JetgroovyIcons.Groovy.Property); myConsumer.consume(builder); } } }