module fr.irit.fiacre.xtext.GenerateFiacre

import org.eclipse.xtext.xtext.generator.*
import org.eclipse.xtext.xtext.generator.model.project.*

var rootPath = ".."

Workflow {
	
	component = XtextGenerator {
		configuration = {
			project = StandardProjectConfig {
				baseName = "fr.irit.fiacre.xtext"
				rootPath = rootPath
				eclipsePlugin = {
					enabled = true
				}
				createEclipseMetaData = true
			}
			code = {
				encoding = "UTF-8"
				fileHeader = "/*\n * generated by Xtext \${version}\n */" 
			}
			
		}
		language = StandardLanguage {
			name = "fr.irit.fiacre.xtext.Fiacre"
			fileExtensions = "fcr"
			
			grammarAccess = grammarAccess.GrammarAccessFragment2 auto-inject{}
			emfGenerator = ecore.EMFGeneratorFragment2 auto-inject{}
			serializer = {
				generateStub = false
			}
			
			validator = validation.ValidatorFragment2 {
				// composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator"
			}
			scopeProvider = scoping.ImportNamespacesScopingFragment2 auto-inject{}
			qualifiedNamesProvider = exporting.QualifiedNamesFragment2 auto-inject{}
			builder = builder.BuilderIntegrationFragment2 auto-inject{}
			generator = generator.GeneratorFragment2 auto-inject{}
			formatter =formatting.Formatter2Fragment2 auto-inject{}
			labelProvider=ui.labeling.LabelProviderFragment2 auto-inject{}
			outline=ui.outline.OutlineTreeProviderFragment2 auto-inject{}
			quickOutline = ui.outline.QuickOutlineFragment2 auto-inject{}
			quickFixProvider = ui.quickfix.QuickfixProviderFragment2 auto-inject{}
			contentAssist =ui.contentAssist.ContentAssistFragment2 auto-inject{}
			parserGenerator = parser.antlr.XtextAntlrGeneratorFragment2 {
				options={
					backtrack=true
					classSplitting=true
					fieldsPerClass="500"
				}
			}
			junitSupport =auto-inject {}
			renameRefactoring = auto-inject{}
			resourceFactoryFragment = auto-inject{}
			compareEditor = auto-inject{}
		}
	}
}
