docs: @Pure
  	public String format(String sarlCode, ResourceSet resourceSet) {
  		try {
  			final URI createURI = URI.createURI("synthetic://to-be-formatted." + this.fileExtension); //$NON-NLS-1$
  			final Resource res = this.resourceFactory.createResource(createURI);
  			if (res instanceof XtextResource) {
  				final XtextResource resource = (XtextResource) res;
  				final EList<Resource> resources = resourceSet.getResources();
  				resources.add(resource);
  				try (StringInputStream stringInputStream = new StringInputStream(sarlCode)) {
  					resource.load(stringInputStream, Collections.emptyMap());
  					return formatResource(resource);
  				} finally {
  					resources.remove(resource);
  				}
  			}
  			return sarlCode;
  		} catch (Exception exception) {
  			throw Exceptions.sneakyThrow(exception);
  		}
  	}