Class XTextGeneratorConfiguration

java.lang.Object
de.uka.ipd.sdq.workflow.mdsd.xtext.generator.XTextGeneratorConfiguration

public class XTextGeneratorConfiguration extends Object
A configuration for using the XText 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 used
      languageName - The name of the language
      fileExtension - The file extension of the model
      outputPackageName - The package name used for output
  • Method Details

    • initMWEBean

      public void initMWEBean()
      Create and init the StandaloneSetup for the MWE.
    • setModelFilePath

      public void setModelFilePath(String modelPath)
      Set the file path to the model directory.
      Parameters:
      modelPath - the new model file path
    • setTargetDir

      public void setTargetDir(String targetDir)
      Set the target directory for the generator.
      Parameters:
      targetDir - the new target dir
    • setSourceSlot

      public void setSourceSlot(String slotName)
      Set the slot that is used for loading the model.
      Parameters:
      slotName - the new source slot
    • getGeneratorClass

      public Class<? extends org.eclipse.xtext.generator.IGenerator> getGeneratorClass()
      Gets the generator class.
      Returns:
      the generatorClass
    • getLanguageName

      public String getLanguageName()
      Gets the language name.
      Returns:
      the languageName
    • getFileExtension

      public String 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

      public XTextGeneratorSupport createGeneratorSupport()
      Create the GeneratorSupport.
      Returns:
      the x text generator support
    • getSlots

      public Set<String> getSlots()
      Gets the slots.
      Returns:
      the slots
    • getBlackboardModelLocation

      public ModelLocation getBlackboardModelLocation()
      Gets the blackboard model location.
      Returns:
      the blackboard model location
    • setBlackboardModelLocation

      public void setBlackboardModelLocation(ModelLocation modelLocation)
      Sets the blackboard model location.
      Parameters:
      modelLocation - the new blackboard model location
    • createBlackboardReader

      public BlackboardReader createBlackboardReader()
      Creates the blackboard reader.
      Returns:
      the blackboard reader