module com.minres.rdl.GenerateRDL

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

var rootPath = ".."

Workflow {
	
	component = XtextGenerator {
		configuration = {
			project = StandardProjectConfig {
				baseName = "com.minres.rdl"
				rootPath = rootPath
				runtimeTest = {
					enabled = true
				}
				eclipsePlugin = {
					enabled = true
				}
				eclipsePluginTest = {
					enabled = true
				}
				web = {
					enabled = true
				}
				createEclipseMetaData = true
			}
			code = {
				encoding = "UTF-8"
				lineDelimiter = "\n"
				fileHeader = "/*\n * generated by Xtext \${version}\n */"
			}
		}
		language = StandardLanguage {
			name = "com.minres.rdl.RDL"
			fileExtensions = "rdl"

			fragment = exporting.SimpleNamesFragment2 auto-inject {}

        	parserGenerator = {
                options = {
                    backtrack = true
                }
            }
			serializer = {
				generateStub = false
			}
			validator = {
				// composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator"
			}
			generator = {
                generateXtendMain = true
            }
			newProjectWizardForEclipse = {
            	generate = true
         	}
		}
	}
}
