@@ -104,22 +104,27 @@ private Map<String, String> getFullyQualifiedNames(final Project project) {
104
104
105
105
for (AnnotationTypes annotationType : AnnotationTypes .values ()) {
106
106
annotations .put (annotationType .getFullyQualifiedName (), annotationType .getAnnotation ());
107
+ addCustomHandlers (annotations , project , annotationType .getFullyQualifiedName ());
108
+ }
109
+ return annotations ;
110
+ }
107
111
108
- final PsiClass eventHandlerAnnotation = JavaPsiFacade . getInstance ( project )
109
- . findClass ( annotationType . getFullyQualifiedName (),
110
- GlobalSearchScope .allScope (project ));
112
+ private void addCustomHandlers ( final HashMap < String , String > annotations , final Project project , final String fullyQualifiedName ) {
113
+ final PsiClass eventHandlerAnnotation = JavaPsiFacade . getInstance ( project )
114
+ . findClass ( fullyQualifiedName , GlobalSearchScope .allScope (project ));
111
115
112
- if (eventHandlerAnnotation != null ) {
113
- final Query <PsiClass > customEventHandlers = searchPsiClasses (eventHandlerAnnotation , projectScope (project ));
114
- customEventHandlers .forEach (new Processor <PsiClass >() {
115
- @ Override
116
- public boolean process (final PsiClass psiClass ) {
117
- annotations . put (psiClass .getQualifiedName (), psiClass . getName ());
118
- return true ;
116
+ if (eventHandlerAnnotation != null ) {
117
+ final Query <PsiClass > customEventHandlers = searchPsiClasses (eventHandlerAnnotation , projectScope (project ));
118
+ customEventHandlers .forEach (new Processor <PsiClass >() {
119
+ @ Override
120
+ public boolean process (final PsiClass psiClass ) {
121
+ if (psiClass .isAnnotationType ()) {
122
+ addCustomHandlers ( annotations , project , psiClass . getQualifiedName ()) ;
119
123
}
120
- });
121
- }
124
+ annotations .put (psiClass .getQualifiedName (), psiClass .getName ());
125
+ return true ;
126
+ }
127
+ });
122
128
}
123
- return annotations ;
124
129
}
125
130
}
0 commit comments