docs: @SuppressWarnings({ "resource", "unused", "checkstyle:npathcomplexity" })
  	private void installJvmTypeProvider(ResourceSet resourceSet, File temporaryClassDirectory, boolean skipIndexLookup,
  			IProgressMonitor progress) {
  		assert progress != null;
  		progress.subTask(Messages.SarlBatchCompiler_58);
  		final Iterable<File> classpath;
  		if (temporaryClassDirectory != null) {
  			classpath = Iterables.concat(
  					Collections.singletonList(temporaryClassDirectory),
  					getClassPath(), getSourcePaths());
  		} else {
  			classpath = Iterables.concat(getClassPath(), getSourcePaths());
  		}
  		if (getLogger().isDebugEnabled()) {
  			getLogger().debug(Messages.SarlBatchCompiler_17, classpath);
  		}
  		if (progress.isCanceled()) {
  			return;
  		}
  		final ClassLoader parentClassLoader;
  		if (isUseCurrentClassLoaderAsParent()) {
  			parentClassLoader = getClass().getClassLoader();
  		} else if (getBootClassPath().isEmpty()) {
  			parentClassLoader = getCurrentClassLoader();
  		} else {
  			parentClassLoader = new AlternateJdkLoader(getBootClassPath());
  		}
  		if (progress.isCanceled()) {
  			return;
  		}
  		this.jvmTypesClassLoader = createClassLoader(classpath, parentClassLoader);
  		if (progress.isCanceled()) {
  			return;
  		}
  		new ClasspathTypeProvider(this.jvmTypesClassLoader, resourceSet, skipIndexLookup ? null : this.indexedJvmTypeAccess, null);
  		if (progress.isCanceled()) {
  			return;
  		}
  		((XtextResourceSet) resourceSet).setClasspathURIContext(this.jvmTypesClassLoader);
  		if (progress.isCanceled()) {
  			return;
  		}
  
  		// for annotation processing we need to have the compiler's classpath as a parent.
  		progress.subTask(Messages.SarlBatchCompiler_59);
  		this.annotationProcessingClassLoader = createClassLoader(classpath, getCurrentClassLoader());
  		if (progress.isCanceled()) {
  			return;
  		}
  		resourceSet.eAdapters().add(new ProcessorInstanceForJvmTypeProvider.ProcessorClassloaderAdapter(this.annotationProcessingClassLoader));
  	}