RaNativeProcessor.process(deploymentRoot); Map<ResourceRoot, Index> annotationIndexes = new HashMap<ResourceRoot, Index>(); ResourceRootIndexer.indexResourceRoot(resourceRoot); Index index = resourceRoot.getAttachment(Attachments.ANNOTATION_INDEX); if (index != null) {
/** * Process this deployment for annotations. This will use an annotation indexer to create an index of all annotations * found in this deployment and attach it to the deployment unit context. * * @param phaseContext the deployment unit context * @throws DeploymentUnitProcessingException * */ public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); for (ResourceRoot resourceRoot : DeploymentUtils.allResourceRoots(deploymentUnit)) { ResourceRootIndexer.indexResourceRoot(resourceRoot); } }
/** * Process this deployment for annotations. This will use an annotation indexer to create an index of all annotations * found in this deployment and attach it to the deployment unit context. * * @param phaseContext the deployment unit context * @throws DeploymentUnitProcessingException * */ public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); for (ResourceRoot resourceRoot : DeploymentUtils.allResourceRoots(deploymentUnit)) { ResourceRootIndexer.indexResourceRoot(resourceRoot); } }
/** * Process this deployment for annotations. This will use an annotation indexer to create an index of all annotations * found in this deployment and attach it to the deployment unit context. * * @param phaseContext the deployment unit context * @throws DeploymentUnitProcessingException * */ public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); for (ResourceRoot resourceRoot : DeploymentUtils.allResourceRoots(deploymentUnit)) { ResourceRootIndexer.indexResourceRoot(resourceRoot); } }
/** * Process this deployment for annotations. This will use an annotation indexer to create an index of all annotations * found in this deployment and attach it to the deployment unit context. * * @param phaseContext the deployment unit context * @throws DeploymentUnitProcessingException * */ public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); for (ResourceRoot resourceRoot : DeploymentUtils.allResourceRoots(deploymentUnit)) { ResourceRootIndexer.indexResourceRoot(resourceRoot); } }
RaNativeProcessor.process(deploymentRoot); Map<ResourceRoot, Index> annotationIndexes = new HashMap<ResourceRoot, Index>(); ResourceRootIndexer.indexResourceRoot(resourceRoot); Index index = resourceRoot.getAttachment(Attachments.ANNOTATION_INDEX); if (index != null) {
/** * 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 deploymentUnit The deployment unit * @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 DeploymentUnit deploymentUnit, final VirtualFile file) throws DeploymentUnitProcessingException { try { final Closeable closable = file.isFile() ? VFS.mountZip(file, file, TempFileProviderService.provider()) : null; final MountHandle mountHandle = new MountHandle(closable); final ResourceRoot resourceRoot = new ResourceRoot(file, mountHandle); deploymentUnit.addToAttachmentList(Attachments.RESOURCE_ROOTS, resourceRoot); ModuleRootMarker.mark(resourceRoot); ResourceRootIndexer.indexResourceRoot(resourceRoot); return resourceRoot; } catch (IOException e) { throw new RuntimeException(e); } }
RaNativeProcessor.process(deploymentRoot); Map<ResourceRoot, Index> annotationIndexes = new HashMap<ResourceRoot, Index>(); ResourceRootIndexer.indexResourceRoot(resourceRoot); Index index = resourceRoot.getAttachment(Attachments.ANNOTATION_INDEX); if (index != null) {
/** * 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 = new MountHandle(closable); final ResourceRoot resourceRoot = new ResourceRoot(file, mountHandle); ModuleRootMarker.mark(resourceRoot); ResourceRootIndexer.indexResourceRoot(resourceRoot); return resourceRoot; } catch (IOException e) { throw new RuntimeException(e); } }
/** * 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 = new MountHandle(closable); final ResourceRoot resourceRoot = new ResourceRoot(file, mountHandle); ModuleRootMarker.mark(resourceRoot); ResourceRootIndexer.indexResourceRoot(resourceRoot); return resourceRoot; } catch (IOException e) { throw new RuntimeException(e); } }
/** * 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); } }
if(additional != null) { for(ResourceRoot resource : additional.getResourceRoots()) { ResourceRootIndexer.indexResourceRoot(resource); Index indexAttachment = resource.getAttachment(Attachments.ANNOTATION_INDEX); if(indexAttachment != null) {
if(additional != null) { for(ResourceRoot resource : additional.getResourceRoots()) { ResourceRootIndexer.indexResourceRoot(resource); Index indexAttachment = resource.getAttachment(Attachments.ANNOTATION_INDEX); if(indexAttachment != null) {
deploymentUnit.addToAttachmentList(Attachments.ADDITIONAL_MODULES, additional); for (final ResourceRoot root : additionalModuleResourceRoots) { ResourceRootIndexer.indexResourceRoot(root);
deploymentUnit.addToAttachmentList(Attachments.ADDITIONAL_MODULES, additional); for (final ResourceRoot root : additionalModuleResourceRoots) { ResourceRootIndexer.indexResourceRoot(root);
deploymentUnit.addToAttachmentList(Attachments.ADDITIONAL_MODULES, additional); for (final ResourceRoot root : additionalModuleResourceRoots) { ResourceRootIndexer.indexResourceRoot(root);
deploymentUnit.addToAttachmentList(Attachments.ADDITIONAL_MODULES, additional); for (final ResourceRoot root : additionalModuleResourceRoots) { ResourceRootIndexer.indexResourceRoot(root);
deploymentUnit.addToAttachmentList(Attachments.RESOURCE_ROOTS, additionalResourceRoot); ResourceRootIndexer.indexResourceRoot(additionalResourceRoot); ModuleRootMarker.mark(additionalResourceRoot);
deploymentUnit.addToAttachmentList(Attachments.RESOURCE_ROOTS, additionalResourceRoot); ResourceRootIndexer.indexResourceRoot(additionalResourceRoot); ModuleRootMarker.mark(additionalResourceRoot);
deploymentUnit.addToAttachmentList(Attachments.RESOURCE_ROOTS, additionalResourceRoot); ResourceRootIndexer.indexResourceRoot(additionalResourceRoot); ModuleRootMarker.mark(additionalResourceRoot);