PsiDirectory () { VirtualFile parentFile = myFile.getParent(); if (parentFile == null) return null; if (!parentFile.isValid()) { LOG.error("Invalid parent: " + parentFile + " of dir " + myFile + ", dir.valid=" + myFile.isValid()); return null; } return myManager.findDirectory(parentFile); }