boolean () { if (isDeleted()) return false; return ReadAction.compute(() -> { if (getRefManager().getProject().isDisposed()) return false; final PsiFile file = myID.getContainingFile(); //no need to check resolve in offline mode if (ApplicationManager.getApplication().isHeadlessEnvironment()) { return file != null && file.isPhysical(); } final PsiElement element = getPsiElement(); return element != null && element.isPhysical(); }); }