boolean (@NotNull PsiMethod psiMethod, @NotNull PsiClass controllerClass) { final PsiClass containingClass = psiMethod.getContainingClass(); if (containingClass != null && CommonClassNames.JAVA_LANG_OBJECT.equals(containingClass.getQualifiedName())) return false; if (!psiMethod.hasModifierProperty(PsiModifier.STATIC)) { final PsiParameter[] parameters = psiMethod.getParameterList().getParameters(); if (parameters.length == 1) { PsiType parameterType = parameters[0].getType(); if (containingClass != null && !controllerClass.isEquivalentTo(containingClass)) { final PsiSubstitutor substitutor = TypeConversionUtil.getSuperClassSubstitutor(containingClass, controllerClass, PsiSubstitutor.EMPTY); parameterType = substitutor.substitute(parameterType); } if (InheritanceUtil.isInheritor(parameterType, JavaFxCommonNames.JAVAFX_EVENT)) { return true; } } return parameters.length == 0; } return false; }