final List<VirtualFile> virtualFiles = DartLibraryIndex.findLibraryClass(this, libraryName);
final List<PsiElementResolveResult> result = new ArrayList<PsiElementResolveResult>();
for (VirtualFile virtualFile : virtualFiles) {
final PsiFile psiFile = getManager().findFile(virtualFile);
for (PsiElement root : DartResolveUtil.findDartRoots(psiFile)) {
DartLibraryStatement lib = PsiTreeUtil.getChildOfType(root, DartLibraryStatement.class);
if (lib == null) {
continue;
}
DartQualifiedComponentName componentName = lib.getQualifiedComponentName();
result.add(new PsiElementResolveResult(componentName));
}
}
return result.toArray(new ResolveResult[result.size()]);
}