docs: private synchronized ResourceRoot createResourceRoot(final VirtualFile file, final DeploymentUnit deploymentUnit, final VirtualFile deploymentRoot) throws DeploymentUnitProcessingException {
          try {
              Map<String, MountedDeploymentOverlay> overlays = deploymentUnit.getAttachment(Attachments.DEPLOYMENT_OVERLAY_LOCATIONS);
  
              String relativeName = file.getPathNameRelativeTo(deploymentRoot);
              MountedDeploymentOverlay overlay = overlays.get(relativeName);
              Closeable closable = null;
              if(overlay != null) {
                  overlay.remountAsZip(false);
              } else if(file.isFile()) {
                  closable = VFS.mountZip(file, file, TempFileProviderService.provider());
              }
              final MountHandle mountHandle = MountHandle.create(closable);
              final ResourceRoot resourceRoot = new ResourceRoot(file, mountHandle);
              ModuleRootMarker.mark(resourceRoot);
              ResourceRootIndexer.indexResourceRoot(resourceRoot);
              return resourceRoot;
          } catch (IOException e) {
              throw new RuntimeException(e);
          }
      }