PsiElementsValidityState () { PsiElementsValidityState state = new PsiElementsValidityState(); PsiFile psiFile = getPsiFile(); if (psiFile != null) { for (PsiElement psiElement : myValidator.getDependencies(psiFile)) { state.addDependency(psiElement); } } return state; }