public boolean isIndexing() { return this.compilerPhases.isIndexing(this.xtendFile); }
try { monitor.subTask(Messages.SarlBatchCompiler_45); this.compilerPhases.setIndexing(resourceSet, true); if (monitor.isCanceled()) { return false; } finally { monitor.subTask(Messages.SarlBatchCompiler_46); this.compilerPhases.setIndexing(resourceSet, false); if (monitor.isCanceled()) { return false;
File classDirectory = createTempDir("classes"); try { compilerPhases.setIndexing(resourceSet, true); compilerPhases.setIndexing(resourceSet, false);
public boolean isIndexingPhase(Notifier notifier) { return compilerPhases.isIndexing(notifier); }
BatchLinkableResource resource = (BatchLinkableResource)xtendFile.eResource(); try { compilerPhases.setIndexing(xtendFile, true); try { contexts = contextProvider.computeContext(xtendFile); compilerPhases.setIndexing(xtendFile, false); resource.getCache().clear(resource);
/** * And if we are in the indexing phase, we don't want to see the local resources. */ @Override public IResourceDescriptions getResourceDescriptions(ResourceSet resourceSet) { IResourceDescriptions result = super.getResourceDescriptions(resourceSet); if (compilerPhases.isIndexing(resourceSet)) { // during indexing we don't want to see any local files String projectName = getProjectName(resourceSet); if(projectName != null) { final String encodedProjectName = URI.encodeSegment(projectName, true); Predicate<URI> predicate = new Predicate<URI>() { @Override public boolean apply(URI uri) { return isProjectLocal(uri, encodedProjectName); } }; if (result instanceof IShadowedResourceDescriptions) { return new ShadowedFilteringResourceDescriptions(result, predicate); } else { return new FilteringResourceDescriptions(result, predicate); } } } return result; }
XtextResource xtextResource = (XtextResource) eResource(); CompilerPhases compilerPhases = xtextResource.getResourceServiceProvider().get(CompilerPhases.class); if (compilerPhases.isIndexing(xtextResource.getResourceSet())) { allNestedTypesByName = null;
Triple<EObject, EReference, INode> triple = getEncoder().decode(this, uriFragment); if (batchLinkingService.isBatchLinkable(triple.getSecond())) { if (compilerPhases.isIndexing(this)) log.error("Don't resolve expressions during indexing!", new IllegalStateException("Resource URI : "+getURI()+", fragment : "+uriFragment)); return batchLinkingService.resolveBatched(triple.getFirst(), triple.getSecond(), uriFragment);
if (!compilerPhases.isIndexing(xExpression)){ final IResolvedTypes resolvedTypes = typeResolver.resolveTypes(xExpression); final LightweightTypeReference type = resolvedTypes.getReturnType(xExpression);