@NotNull
 @Override
 public NavigationItem[] getItemsByName(
     String name, String pattern, Project project, boolean includeNonProjectItems) {
   final GlobalSearchScope scope =
       includeNonProjectItems
           ? GlobalSearchScope.allScope(project)
           : GlobalSearchScope.projectScope(project);
   final Collection<HaxeComponent> result =
       HaxeComponentIndex.getItemsByName(name, project, scope);
   return result.toArray(new NavigationItem[result.size()]);
 }
 public void doTest() {
   final PsiFile file =
       PsiDocumentManager.getInstance(myFixture.getProject())
           .getPsiFile(myFixture.getEditor().getDocument());
   assertNotNull(file);
   final HaxeType type =
       PsiTreeUtil.getParentOfType(
           file.findElementAt(myFixture.getCaretOffset()), HaxeType.class, false);
   assertNotNull(type);
   final GlobalSearchScope scope = HaxeResolveUtil.getScopeForElement(type);
   new HaxeTypeAddImportIntentionAction(
           type,
           HaxeComponentIndex.getItemsByName(
               type.getReferenceExpression().getText(), type.getProject(), scope))
       .execute();
   myFixture.checkResultByFile(getTestName(false) + ".txt");
 }
 @NotNull
 @Override
 public String[] getNames(Project project, boolean includeNonProjectItems) {
   final Collection<String> result = HaxeComponentIndex.getNames(project);
   return ArrayUtil.toStringArray(result);
 }