org.eclipse.xtext.xbase.testing.OnTheFlyJavaCompiler2 Java Examples

The following examples show how to use org.eclipse.xtext.xbase.testing.OnTheFlyJavaCompiler2. 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: ExtendedSARLInjectorProvider.java    From sarl with Apache License 2.0 5 votes vote down vote up
/** Create the module for tests of the runtime libraries.
 *
 * @return the module.
 */
@SuppressWarnings("static-method")
protected Module createRuntimeTestModule() {
	return new Module() {

		@Override
		public void configure(Binder binder) {
			binder.bind(OnTheFlyJavaCompiler2.class).toProvider(JavaCompilerProvider.class).asEagerSingleton();
		}

	};
}
 
Example #2
Source File: ExtendedSARLInjectorProvider.java    From sarl with Apache License 2.0 5 votes vote down vote up
@Override
public OnTheFlyJavaCompiler2 get() {
	final String minJava = SARLVersion.MINIMAL_JDK_VERSION_FOR_SARL_COMPILATION_ENVIRONMENT;
	final JavaVersion jversion = JavaVersion.fromQualifier(minJava);
	return new OnTheFlyJavaCompiler2(
			SARLInjectorProvider.class.getClassLoader(),
			jversion);
}