EA-79072 - SOE: SmartPsiElementPointerImpl.getContainingFile

This commit is contained in:
peter
2017-02-16 08:02:43 +01:00
parent 9ec07e5812
commit 8d41818678
@@ -45,6 +45,11 @@ class SmartPsiFileRangePointerImpl extends SmartPsiElementPointerImpl<PsiFile> i
return new SelfElementInfo(project, range, Identikit.fromTypes(PsiElement.class, null, LanguageUtil.getRootLanguage(containingFile)), containingFile, forInjected);
}
@Override
public PsiFile getContainingFile() {
return getElementInfo().restoreFile();
}
@Override
public PsiFile getElement() {
if (getRange() == null) return null; // range is invalid