Query<PsiReference> search = ReferencesSearch.search(o, new LocalSearchScope(o.getContainingFile()));
if (search.findFirst() == null) {
problemsHolder.registerProblem(o.getNameIdentifier(),
"Unused function " + "'" + o.getName() + "'",
ProblemHighlightType.LIKE_UNUSED_SYMBOL,
new ErlangRemoveTypeFix(),
new ErlangExportTypeFix());
}
}
}