protected void resolveProxies(final Resource resource, final CancelIndicator monitor) { EcoreUtil2.resolveLazyCrossReferences(resource, monitor); }
protected void doLinking() { doIndex(); for (Resource resource : sources) { EcoreUtil2.resolveLazyCrossReferences(resource, CancelIndicator.NullImpl); } }
private Resource getResource(URI modelUri) { Resource resource = this.resourceSet.getResource(modelUri, true); EcoreUtil2.resolveLazyCrossReferences(resource, CancelIndicator.NullImpl); return resource; }
public Iterable<QualifiedName> getImportedNames() { EcoreUtil2.resolveLazyCrossReferences(resource, CancelIndicator.NullImpl); ImportedNamesAdapter adapter = ImportedNamesAdapter.find(getResource()); if (adapter != null) { ImmutableSet<QualifiedName> result = ImmutableSet.copyOf(adapter.getImportedNames()); return result; } return Collections.emptySet(); }
/** Generate the JVM model elements. * * @param progress monitor of the progress of the compilation. * @param resourceSet the container of the scripts. */ protected void generateJvmElements(ResourceSet resourceSet, IProgressMonitor progress) { assert progress != null; progress.subTask(Messages.SarlBatchCompiler_21); getLogger().info(Messages.SarlBatchCompiler_21); final List<Resource> resources = new LinkedList<>(resourceSet.getResources()); for (final Resource resource : resources) { if (progress.isCanceled()) { return; } getLogger().debug(Messages.SarlBatchCompiler_26, resource.getURI().lastSegment()); resource.getContents(); } for (final Resource resource : resources) { if (progress.isCanceled()) { return; } getLogger().debug(Messages.SarlBatchCompiler_27, resource.getURI().lastSegment()); EcoreUtil2.resolveLazyCrossReferences(resource, CancelIndicator.NullImpl); } }
protected List<IReferenceDescription> computeReferenceDescriptions() { final List<IReferenceDescription> referenceDescriptions = Lists.newArrayList(); IAcceptor<IReferenceDescription> acceptor = new IAcceptor<IReferenceDescription>() { public void accept(IReferenceDescription referenceDescription) { referenceDescriptions.add(referenceDescription); } }; EcoreUtil2.resolveLazyCrossReferences(resource, CancelIndicator.NullImpl); Map<EObject, IEObjectDescription> eObject2exportedEObjects = createEObject2ExportedEObjectsMap(getExportedObjects()); TreeIterator<EObject> contents = EcoreUtil.getAllProperContents(this.resource, true); while (contents.hasNext()) { EObject eObject = contents.next(); URI exportedContainerURI = findExportedContainerURI(eObject, eObject2exportedEObjects); if (!strategy.createReferenceDescriptions(eObject, exportedContainerURI, acceptor)) contents.prune(); } return referenceDescriptions; }
resources.add(resource); resource.getContents(); EcoreUtil2.resolveLazyCrossReferences(resource, CancelIndicator.NullImpl); hasValidationErrors = ((!this.validate(resource)) || hasValidationErrors); clusterIndex++;
asynchronousWork.exec(documentAccess); EcoreUtil2.resolveLazyCrossReferences(documentAccess.getResource(), synchronizer); } catch (final Throwable _t) { if (_t instanceof VirtualMachineError) {
EcoreUtil2.resolveLazyCrossReferences(resource, cancelMonitor); final IResourceDescription description = manager.getResourceDescription(resource); final IResourceDescription copiedDescription = BuilderStateUtil.create(description);