@Override
public PsiElement resolve() {
PsiFile containingFile = myElement.getContainingFile();
if (containingFile instanceof ErlangFile) {
ErlangRecordDefinition record = ((ErlangFile) containingFile).getRecord(myReferenceName);
if (record != null) return record;
return ContainerUtil.getFirstItem(ErlangPsiImplUtil.getErlangRecordFromIncludes((ErlangFile) containingFile, false, myReferenceName));
}
return null;