private boolean isInDirectoryBasedRoot(final VirtualFile file) {
   if (file == null) return false;
   final StorageScheme storageScheme = ((ProjectEx) myProject).getStateStore().getStorageScheme();
   if (StorageScheme.DIRECTORY_BASED.equals(storageScheme)) {
     final VirtualFile baseDir = myProject.getBaseDir();
     if (baseDir == null) return false;
     final VirtualFile ideaDir = baseDir.findChild(Project.DIRECTORY_STORE_FOLDER);
     return ideaDir != null
         && ideaDir.isValid()
         && ideaDir.isDirectory()
         && VfsUtilCore.isAncestor(ideaDir, file, false);
   }
   return false;
 }
 public static boolean isDirectoryBased(@NotNull Project project) {
   IComponentStore store = ServiceKt.getStateStore(project);
   return store instanceof IProjectStore
       && StorageScheme.DIRECTORY_BASED.equals(((IProjectStore) store).getStorageScheme());
 }