use of org.eclipse.xtend.core.macro.CompilationContextImpl in project xtext-xtend by eclipse.
the class CompilationUnitImpl method setCompilationStrategy.
public void setCompilationStrategy(final JvmExecutable executable, final CompilationStrategy compilationStrategy) {
this.checkCanceled();
final Procedure1<ITreeAppendable> _function = (ITreeAppendable it) -> {
final CompilationContextImpl context = new CompilationContextImpl(it, this);
it.append(this.trimTrailingLinebreak(compilationStrategy.compile(context), executable));
};
this.jvmTypesBuilder.setBody(executable, _function);
}
use of org.eclipse.xtend.core.macro.CompilationContextImpl in project xtext-xtend by eclipse.
the class CompilationUnitImpl method setCompilationStrategy.
public void setCompilationStrategy(final JvmField field, final CompilationStrategy compilationStrategy) {
this.checkCanceled();
final Procedure1<ITreeAppendable> _function = (ITreeAppendable it) -> {
final CompilationContextImpl context = new CompilationContextImpl(it, this);
it.append(compilationStrategy.compile(context));
};
this.jvmTypesBuilder.setInitializer(field, _function);
}
Aggregations