@Nullable
 public final <T extends DomElement> DomFileElementImpl<T> getFileElement(XmlFile file) {
   if (file == null) return null;
   if (!(file.getFileType() instanceof DomSupportEnabled)) return null;
   final VirtualFile virtualFile = file.getVirtualFile();
   if (virtualFile != null && virtualFile.isDirectory()) return null;
   return this.<T>getOrCreateCachedValueProvider(file).getFileElement();
 }
 private void processFileOrDirectoryChange(final VirtualFile file) {
   if (!ProjectFileIndex.SERVICE.getInstance(myProject).isInContent(file)) return;
   if (!file.isDirectory()) {
     processFileChange(file);
   } else {
     processDirectoryChange(file);
   }
 }
 private void processDirectoryChange(final VirtualFile directory) {
   for (final VirtualFile file : directory.getChildren()) {
     processFileOrDirectoryChange(file);
   }
 }
 private void processFileChange(final VirtualFile file) {
   if (StdFileTypes.XML != file.getFileType()) return;
   processFileChange(getCachedPsiFile(file));
 }