module org.etsi.mts.tdl.GenerateTDL

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

var rootPath = "platform:/resource/org.etsi.mts.tdl.model"
//var rootPath = "platform:/resource/"
var rootPaths = "org.etsi.mts.tdl.model"

Workflow {
	
	bean = org.eclipse.emf.mwe.utils.StandaloneSetup {
//	    platformUri=".."
        scanClassPath = true
	}
	
	component = org.eclipse.emf.mwe.utils.DirectoryCleaner {
	    directory ="src-gen"
	}
	
	component = org.eclipse.emf.mwe2.ecore.EcoreGenerator {
	    generateCustomClasses = false
	    generateModel = true
	    generateEdit = false
	    generateEditor = false
	    genModel = "platform:/resource/${rootPaths}/model/tdl.genmodel"
	    srcPath = "platform:/resource/${rootPaths}/src-gen" 
//	    genModel = "../plugins/${rootPaths}/model/tdl.genmodel"
	}

	component = org.eclipse.emf.mwe2.ecore.EcoreGenerator {
	    generateCustomClasses = false
	    generateModel = true
	    generateEdit = false
	    generateEditor = false
	    genModel = "platform:/resource/${rootPaths}/model/structured.genmodel"
	    srcPath = "platform:/resource/${rootPaths}/src-gen" 
	}

	component = org.eclipse.emf.mwe2.ecore.EcoreGenerator {
	    generateCustomClasses = false
	    generateModel = true
	    generateEdit = false
	    generateEditor = false
	    genModel = "platform:/resource/${rootPaths}/model/configurations.genmodel"
	    srcPath = "platform:/resource/${rootPaths}/src-gen" 
	}


}
//TODO: move to separate project?
//TODO: repeat for structured and configurations
