FileStatus (Object element) { if (myEditor == null || myPsiFile == null) return FileStatus.NOT_CHANGED; if (!(element instanceof PsiElement psiElement)) return FileStatus.NOT_CHANGED; if (!psiElement.isValid() || psiElement.getContainingFile() != myPsiFile) return FileStatus.NOT_CHANGED; return ElementStatusTracker.getInstance(myPsiFile.getProject()).getElementStatus(psiElement); }