for (int j = 0; j < startOffsets.length; j++) {
final int startOffset = startOffsets[j];
for (final PsiElement element : CollectHighlightsUtil.getElementsInRange(file, startOffset, endOffsets[j])) {
if (element instanceof HaxeReferenceExpression) {
HaxeReferenceExpression referenceExpression = (HaxeReferenceExpression)element;
if (referenceExpression.resolve() == null) {
final GlobalSearchScope scope = HaxeResolveUtil.getScopeForElement(referenceExpression);
final List<HaxeComponent> components =
HaxeComponentIndex.getItemsByName(referenceExpression.getText(), project, scope);
if (!components.isEmpty() && components.size() == 1) {
haxeClassList.add(((HaxeClass)components.get(0)).getQualifiedName());
}
}
}