<commit_before>package tools.vitruv.dsls.reactions.generator

import org.eclipse.xtend.lib.annotations.Delegate
import tools.vitruv.dsls.reactions.api.generator.IReactionsGenerator
import com.google.inject.Inject
import com.google.inject.Provider

class ExternalReactionsGenerator implements IReactionsGenerator {
	
	// is injected during runtime module setup, see ReactionsLanguageRuntimeModule
	@Inject
	static Provider<InternalReactionsGenerator> internalGeneratorProvider
	
	@Delegate val InternalReactionsGenerator internalGenerator
	
	public new() {
		internalGenerator = internalGeneratorProvider.get()
	}
}<commit_msg>ExternalReactionsGenerator: Create the Runtime Module if necessary<commit_after>package tools.vitruv.dsls.reactions.generator

import org.eclipse.xtend.lib.annotations.Delegate
import tools.vitruv.dsls.reactions.api.generator.IReactionsGenerator
import com.google.inject.Inject
import com.google.inject.Provider
import tools.vitruv.dsls.reactions.ReactionsLanguageRuntimeModule
import com.google.inject.Guice

class ExternalReactionsGenerator implements IReactionsGenerator {
	
	// is injected during runtime module setup, see ReactionsLanguageRuntimeModule
	@Inject
	static Provider<InternalReactionsGenerator> internalGeneratorProvider
	
	@Delegate val InternalReactionsGenerator internalGenerator
	
	public new() {
		if (internalGeneratorProvider === null) {
			// the reactions runtime module was not initialised yet
			Guice.createInjector(new ReactionsLanguageRuntimeModule())
		}
		internalGenerator = internalGeneratorProvider.get()
	}
}
{'fraction_non_alphanumeric': 0.06619987269255251, 'fraction_numerical': 0.0, 'mean_word_length': 6.631067961165049, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1925233', 'n_tokens_mistral': 430, 'n_tokens_neox': 397, 'n_words': 91}