@Override @Nullable public PsiElement retrieve() { PsiFile psiFile = getFile(); if (psiFile == null || !psiFile.isValid()) return null; return SelfElementInfo.findElementInside(psiFile, myStartOffset, myEndOffset, myClass, myLanguage); }
@Override @Nullable public PsiFile getFile() { return SelfElementInfo.restoreFileFromVirtual(myVirtualFile, myProject, myFileLanguage); }
@Override @Nullable public PsiFile getFile() { return SelfElementInfo.restoreFileFromVirtual(myFile, myProject, myLanguage); }
@Override public PsiElement retrieve() { return SelfElementInfo.restoreDirectoryFromVirtual(myFile, myProject); }
@Override @Nullable public PsiFile getFile() { return SelfElementInfo.restoreFileFromVirtual(myVirtualFile, myProject, myInfo.getFileLanguage()); }
private static Segment calcActualRange(@Nonnull PsiFile containingFile, @Nonnull Document document, @Nonnull Segment range) { return SelfElementInfo.calcActualRangeAfterDocumentEvents(containingFile, document, range, true); }