use of org.eclipse.n4js.hlc.base.HeadlessExtensionRegistrationHelper in project n4js by eclipse.
the class HeadlessCompilerFactory method createCompilerWithProperties.
/**
* Construct a {@link N4HeadlessCompiler} with configuration based on the provided properties.
*
* @param properties
* preferences.
*/
public static N4HeadlessCompiler createCompilerWithProperties(Properties properties) {
Injector localinjector = new N4JSHeadlessStandaloneSetup(properties).createInjectorAndDoEMFRegistration();
N4HeadlessCompiler instance = localinjector.getInstance(N4HeadlessCompiler.class);
HeadlessExtensionRegistrationHelper headlessExtensionRegistrationHelper = localinjector.getInstance(HeadlessExtensionRegistrationHelper.class);
headlessExtensionRegistrationHelper.registerExtensions();
return instance;
}
Aggregations