use of com.intellij.lang.javascript.psi.stubs.JSElementIndexingData in project intellij-plugins by JetBrains.
the class AngularIndexUtil method multiResolve.
public static void multiResolve(Project project, final StubIndexKey<String, JSImplicitElementProvider> index, final String lookupKey, final Processor<JSImplicitElement> processor) {
final GlobalSearchScope scope = GlobalSearchScope.allScope(project);
StubIndex.getInstance().processElements(index, lookupKey, project, scope, JSImplicitElementProvider.class, provider -> {
final JSElementIndexingData indexingData = provider.getIndexingData();
if (indexingData != null) {
final Collection<JSImplicitElement> elements = indexingData.getImplicitElements();
if (elements != null) {
for (JSImplicitElement element : elements) {
if (element.getName().equals(lookupKey) && ((index != AngularDirectivesIndex.KEY && index != AngularDirectivesDocIndex.KEY) || AngularJSIndexingHandler.isAngularRestrictions(element.getTypeString()))) {
if (!processor.process(element))
return false;
}
}
}
}
return true;
});
}
Aggregations