org.eclipse.xtext.generator.trace.TraceRegionSerializer Java Examples

The following examples show how to use org.eclipse.xtext.generator.trace.TraceRegionSerializer. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CommonTypesContribution.java    From xtext-eclipse with Eclipse Public License 2.0 6 votes vote down vote up
public void configure(Binder binder) {
	binder.bind(IQualifiedNameConverter.class);
	
	binder.bind(BuilderDeltaConverter.class);
	binder.bind(DeltaConverter.class);
	binder.bind(TypeURIHelper.class);
	
	binder.bind(TypeResourceUnloader.class);
	binder.bind(JavaChangeQueueFiller.class);
	
	binder.bind(IEagerContribution.class).to(ListenerRegistrar.class);

	binder.bind(TraceRegionSerializer.class);
	binder.bind(ITraceForTypeRootProvider.class).to(TraceForTypeRootProvider.class);
	binder.bind(FolderAwareTrace.class);
	binder.bind(ZipFileAwareTrace.class);
	binder.bind(OppositeFileOpenerContributor.class).to(ClassFileBasedOpenerContributor.class);
}
 
Example #2
Source File: XtendCompilerMojoTraceIT.java    From xtext-xtend with Eclipse Public License 2.0 5 votes vote down vote up
private String loadTraceSourcePath(String file) {
	try {
		FileInputStream in = new FileInputStream(file);
		try {
			AbstractTraceRegion region = new TraceRegionSerializer().readTraceRegionFrom(in);
			return region.getAssociatedSrcRelativePath().toString();
		} finally {
			in.close();
		}
	} catch (Exception e) {
		throw new RuntimeException(e);
	}
}
 
Example #3
Source File: JavaIoFileSystemAccess.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
/**
 * @since 2.4
 */
public JavaIoFileSystemAccess(IResourceServiceProvider.Registry registry, IEncodingProvider encodingProvider,
		TraceFileNameProvider traceFileNameProvider, TraceRegionSerializer traceRegionSerializer) {
	this.registry = registry;
	this.encodingProvider = encodingProvider;
	this.traceFileNameProvider = traceFileNameProvider;
	this.traceSerializer = traceRegionSerializer;
}
 
Example #4
Source File: GenerateTestsMojo.java    From sarl with Apache License 2.0 5 votes vote down vote up
/** Replies the trace serializer.
 *
 * @return the trace serializer.
 */
protected TraceRegionSerializer getTraceSerializer() {
	if (this.traceSerializer == null) {
		this.traceSerializer = this.injector.getInstance(TraceRegionSerializer.class);
	}
	return this.traceSerializer;
}
 
Example #5
Source File: URIBasedFileSystemAccess.java    From xtext-core with Eclipse Public License 2.0 4 votes vote down vote up
public TraceRegionSerializer getTraceRegionSerializer() {
	return traceRegionSerializer;
}
 
Example #6
Source File: URIBasedFileSystemAccess.java    From xtext-core with Eclipse Public License 2.0 4 votes vote down vote up
public void setTraceRegionSerializer(TraceRegionSerializer traceRegionSerializer) {
	this.traceRegionSerializer = traceRegionSerializer;
}