MountHandle dummy = MountHandle.create(null); // actual close is done by the MSC service above seamIntResourceRoot = new ResourceRoot(vf, dummy);
closable = VFS.mountZip(child, child, TempFileProviderService.provider()); final MountHandle mountHandle = MountHandle.create(closable); final ResourceRoot resourceRoot = new ResourceRoot(name, child, mountHandle); for (final FilterSpecification filter : resourceFilters) {
closable = VFS.mountZip(child, child, TempFileProviderService.provider()); final MountHandle mountHandle = MountHandle.create(closable); final ResourceRoot resourceRoot = new ResourceRoot(name, child, mountHandle); for (final FilterSpecification filter : resourceFilters) {
closable = VFS.mountZip(child, child, TempFileProviderService.provider()); final MountHandle mountHandle = MountHandle.create(closable); final ResourceRoot resourceRoot = new ResourceRoot(name, child, mountHandle); for (final FilterSpecification filter : resourceFilters) {
closable = VFS.mountZip(child, child, TempFileProviderService.provider()); final MountHandle mountHandle = MountHandle.create(closable); ResourceRoot resourceRoot = new ResourceRoot(name, child, mountHandle); for (FilterSpecification filter : resourceFilters) {
/** * Creates a {@link ResourceRoot} for the passed {@link VirtualFile file} and adds it to the list of {@link ResourceRoot}s * in the {@link DeploymentUnit deploymentUnit} * * * @param file The file for which the resource root will be created * @return Returns the created {@link ResourceRoot} * @throws java.io.IOException */ 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); } }
mountHandle = MountHandle.create(handle); } catch (IOException e) { failed = true;