<commit_before>package net.winklerweb.cdoxtext.generator

import org.eclipse.xtext.Grammar
import org.eclipse.xtext.generator.BindFactory
import org.eclipse.xtext.generator.Xtend2GeneratorFragment

class AddCDOXtextBindingsFragment extends Xtend2GeneratorFragment {

	override getGuiceBindingsUi(Grammar grammar) {
		new BindFactory().addTypeToType(
		      "org.eclipse.xtext.ui.editor.model.XtextDocumentProvider",
			  "net.winklerweb.cdoxtext.runtime.CDOXtextDocumentProvider")
			.addTypeToType(
			  "org.eclipse.xtext.ui.editor.model.IResourceForEditorInputFactory",
			  "net.winklerweb.cdoxtext.runtime.CDOResourceForEditorInputFactory")
			.addTypeToType(
			  "org.eclipse.xtext.ui.editor.XtextEditor",
			  "net.winklerweb.cdoxtext.runtime.CDOXtextEditor")
			.addTypeToType(
			  "org.eclipse.xtext.formatting2.regionaccess.TextRegionAccessBuilder",
			  "net.winklerweb.cdoxtext.runtime.CDOTextRegionAccessBuilder"
			)
			.addConfiguredBinding(
					"org.eclipse.xtext.ui.editor.LanguageSpecificURIEditorOpener",
					"if (org.eclipse.ui.PlatformUI.isWorkbenchRunning())" +
						"binder.bind(org.eclipse.xtext.ui.editor.IURIEditorOpener.class)"
							+ ".annotatedWith(org.eclipse.xtext.ui.LanguageSpecific.class)"
							+ ".to(net.winklerweb.cdoxtext.runtime.CDOLanguageSpecificURIEditorOpener.class)")
			.bindings
	}

	override getRequiredBundlesUi(Grammar grammar) {
		#["net.winklerweb.cdoxtext.runtime"]
	}
}<commit_msg>Moved TextRegionAccessBuilder binding to correct module.<commit_after>package net.winklerweb.cdoxtext.generator

import org.eclipse.xtext.Grammar
import org.eclipse.xtext.generator.BindFactory
import org.eclipse.xtext.generator.Xtend2GeneratorFragment

class AddCDOXtextBindingsFragment extends Xtend2GeneratorFragment {

	override getGuiceBindingsRt(Grammar grammar) {
		new BindFactory().addTypeToType(
			  "org.eclipse.xtext.formatting2.regionaccess.TextRegionAccessBuilder",
			  "net.winklerweb.cdoxtext.runtime.CDOTextRegionAccessBuilder"
			)
			.bindings
	}

	override getGuiceBindingsUi(Grammar grammar) {
		new BindFactory().addTypeToType(
		      "org.eclipse.xtext.ui.editor.model.XtextDocumentProvider",
			  "net.winklerweb.cdoxtext.runtime.CDOXtextDocumentProvider")
			.addTypeToType(
			  "org.eclipse.xtext.ui.editor.model.IResourceForEditorInputFactory",
			  "net.winklerweb.cdoxtext.runtime.CDOResourceForEditorInputFactory")
			.addTypeToType(
			  "org.eclipse.xtext.ui.editor.XtextEditor",
			  "net.winklerweb.cdoxtext.runtime.CDOXtextEditor")
			.addConfiguredBinding(
					"org.eclipse.xtext.ui.editor.LanguageSpecificURIEditorOpener",
					"if (org.eclipse.ui.PlatformUI.isWorkbenchRunning())" +
						"binder.bind(org.eclipse.xtext.ui.editor.IURIEditorOpener.class)"
							+ ".annotatedWith(org.eclipse.xtext.ui.LanguageSpecific.class)"
							+ ".to(net.winklerweb.cdoxtext.runtime.CDOLanguageSpecificURIEditorOpener.class)")
			.bindings
	}

	override getRequiredBundlesRt(Grammar grammar) {
		#["net.winklerweb.cdoxtext.runtime;visibility:=reexport"]
	}
	
}
{'fraction_non_alphanumeric': 0.11103789126853378, 'fraction_numerical': 0.0019769357495881385, 'mean_word_length': 5.023809523809524, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5147756', 'n_tokens_mistral': 1173, 'n_tokens_neox': 1021, 'n_words': 90}