Class XTextGeneratorConfiguration
java.lang.Object
de.uka.ipd.sdq.workflow.mdsd.xtext.generator.XTextGeneratorConfiguration
A configuration for using the XText Generator.
-
Constructor Summary
ConstructorDescriptionXTextGeneratorConfiguration
(Class<? extends org.eclipse.xtext.generator.IGenerator> generatorClass, String languageName, String fileExtension, String outputPackageName) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionCreates the blackboard reader.org.eclipse.xtext.generator.GeneratorComponent
Creates and inits the XText generator.Create the GeneratorSupport.org.eclipse.xtext.mwe.Reader
Creates a MWE Reader for the model based on the path and slots.Gets the blackboard model location.Gets the file extension.Class<? extends org.eclipse.xtext.generator.IGenerator>
Gets the generator class.Gets the language name.getSlots()
Gets the slots.void
Initialises the GeneratorModule and GeneratorSetup.void
Create and init the StandaloneSetup for the MWE.void
setBlackboardModelLocation
(ModelLocation modelLocation) Sets the blackboard model location.void
setModelFilePath
(String modelPath) Set the file path to the model directory.void
setSourceSlot
(String slotName) Set the slot that is used for loading the model.void
setTargetDir
(String targetDir) Set the target directory for the generator.
-
Constructor Details
-
XTextGeneratorConfiguration
public XTextGeneratorConfiguration(Class<? extends org.eclipse.xtext.generator.IGenerator> generatorClass, String languageName, String fileExtension, String outputPackageName) Constructor.- Parameters:
generatorClass
- The generator class that is usedlanguageName
- The name of the languagefileExtension
- The file extension of the modeloutputPackageName
- The package name used for output
-
-
Method Details
-
initMWEBean
public void initMWEBean()Create and init the StandaloneSetup for the MWE. -
setModelFilePath
Set the file path to the model directory.- Parameters:
modelPath
- the new model file path
-
setTargetDir
Set the target directory for the generator.- Parameters:
targetDir
- the new target dir
-
setSourceSlot
Set the slot that is used for loading the model.- Parameters:
slotName
- the new source slot
-
getGeneratorClass
Gets the generator class.- Returns:
- the generatorClass
-
getLanguageName
Gets the language name.- Returns:
- the languageName
-
getFileExtension
Gets the file extension.- Returns:
- the fileExtension
-
createReader
public org.eclipse.xtext.mwe.Reader createReader()Creates a MWE Reader for the model based on the path and slots.- Returns:
- the reader
-
createGenerator
public org.eclipse.xtext.generator.GeneratorComponent createGenerator()Creates and inits the XText generator.- Returns:
- the generator component
-
initGeneratorModuleAndGeneratorSetup
public void initGeneratorModuleAndGeneratorSetup()Initialises the GeneratorModule and GeneratorSetup. -
createGeneratorSupport
Create the GeneratorSupport.- Returns:
- the x text generator support
-
getSlots
Gets the slots.- Returns:
- the slots
-
getBlackboardModelLocation
Gets the blackboard model location.- Returns:
- the blackboard model location
-
setBlackboardModelLocation
Sets the blackboard model location.- Parameters:
modelLocation
- the new blackboard model location
-
createBlackboardReader
Creates the blackboard reader.- Returns:
- the blackboard reader
-