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");
}