File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
src/com/magento/idea/magento2plugin/stubs/indexes Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -135,8 +135,9 @@ public static List<XmlTag> getWebApiRoutes(final Method method) {
135135 }
136136 final String classFqn = phpClass .getPresentableFQN ();
137137 final Collection <VirtualFile > containingFiles = FileBasedIndex
138- .getInstance ().getContainingFiles (
139- KEY ,
138+ .getInstance ()
139+ .getContainingFiles (
140+ KEY ,
140141 classFqn ,
141142 GlobalSearchScope .allScope (phpClass .getProject ())
142143 );
@@ -145,12 +146,19 @@ public static List<XmlTag> getWebApiRoutes(final Method method) {
145146 final String methodFqn = method .getName ();
146147
147148 for (final VirtualFile virtualFile : containingFiles ) {
149+ if (!(virtualFile instanceof XmlFile )) {
150+ continue ;
151+ }
148152 final XmlFile file = (XmlFile ) psiManager .findFile (virtualFile );
149153
150154 if (file == null ) {
151155 continue ;
152156 }
153157 final XmlTag rootTag = file .getRootTag ();
158+
159+ if (rootTag == null ) {
160+ continue ;
161+ }
154162 fillRelatedTags (classFqn , methodFqn , rootTag , tags );
155163 }
156164
You can’t perform that action at this time.
0 commit comments