module com.irtsaintexupery.xtext.pseim.GeneratePattern

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

var rootPath = ".."

Workflow {
	
	component = XtextGenerator {
		configuration = {
			project = StandardProjectConfig {
				baseName = "com.irtsaintexupery.xtext.pseim.pattern"
				rootPath = rootPath
				eclipsePlugin = {
					enabled = true
				}
				createEclipseMetaData = true
			}
			code = {
				encoding = "UTF-8"
				lineDelimiter = "\r\n"
				fileHeader = "/*\n * generated by Xtext \${version}\n */"
			}
		}
		language = StandardLanguage {
			name = "com.irtsaintexupery.xtext.pseim.Pattern"
			fileExtensions = "pseimx"
			referencedResource = "platform:/resource/com.irtsaintexupery.pseim/model/pseim.genmodel"
			referencedResource = "platform:/resource/com.irtsaintexupery.pseim/model/seim.genmodel"
			
			fragment = ecore2xtext.Ecore2XtextValueConverterServiceFragment2 auto-inject {}

			formatter = {
				generateStub = true
			}

			serializer = {
				generateStub = false
			}
			validator = {
				// composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator"
			}
		}
	}
}
