Class GeneratorDescriptor
- java.lang.Object
 - 
- jetbrains.mps.project.structure.modules.ModuleDescriptor
 - 
- jetbrains.mps.project.structure.modules.GeneratorDescriptor
 
 
 
- 
- All Implemented Interfaces:
 Copyable<ModuleDescriptor>,CopyableDescriptor<ModuleDescriptor>
public class GeneratorDescriptor extends ModuleDescriptor
 
- 
- 
Constructor Summary
Constructors Constructor Description GeneratorDescriptor() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GeneratorDescriptorcopy()StringgetAlias()While we keep machine-generated module name for Generator modules, alias is a part which Language Designer may pick to his liking.booleangetCompileInMPS()Set<SModuleReference>getDepGenerators()protected intgetHeaderMarker()StringgetOutputPath()FIXME Likely,SolutionDescriptor.getOutputPath(),LanguageDescriptor.getGenPath()and this one need to move to ModuleDescriptor.List<MappingPriorityRule>getPriorityRules()SModuleReferencegetSourceLanguage()booleanisGenerateTemplates()voidload(ModelInputStream stream)voidsave(ModelOutputStream stream)voidsetAlias(String alias)voidsetGenerateTemplates(boolean generateTemplates)voidsetOutputPath(String path)voidsetSourceLanguage(SModuleReference sourceLanguage)booleanupdateModuleRefs(SRepository repository)Expects at least model read access (although likely no reason to invoke in any other case but from write that modified smth)- 
Methods inherited from class jetbrains.mps.project.structure.modules.ModuleDescriptor
addFacetDescriptor, copy0, getAdditionalJavaStubPaths, getDependencies, getDependencyVersions, getDeploymentDescriptor, getId, getLanguageVersions, getLoadException, getModelRootDescriptors, getModuleFacetDescriptors, getModuleReference, getModuleVersion, getNamespace, getSourcePaths, getTimestamp, getUsedDevkits, getUsedLanguages, hasDependencyVersions, hasLanguageVersions, isUseTransientOutput, needsExternalIdeaCompile, removeFacetDescriptor, setDeploymentDescriptor, setHasDependencyVersions, setHasLanguageVersions, setId, setLoadException, setModuleVersion, setNamespace, setNeedsExternalIdeaCompile, setTimestamp, setUseTransientOutput, updateFacetDescriptor, updateModelRefs 
 - 
 
 - 
 
- 
- 
Method Detail
- 
setSourceLanguage
public void setSourceLanguage(SModuleReference sourceLanguage)
 
- 
setAlias
public void setAlias(String alias)
 
- 
getAlias
public String getAlias()
While we keep machine-generated module name for Generator modules, alias is a part which Language Designer may pick to his liking. Note,Generator.getAlias()includes qualified name of source language as prefix, and value of this method is only a suffix, likely kept unchanged during module renames. 
- 
getSourceLanguage
@NotNull public SModuleReference getSourceLanguage()
- Returns:
 - identifier of a language this generator transforms
 
 
- 
getDepGenerators
public Set<SModuleReference> getDepGenerators()
 
- 
getPriorityRules
public List<MappingPriorityRule> getPriorityRules()
 
- 
isGenerateTemplates
public boolean isGenerateTemplates()
 
- 
setGenerateTemplates
public void setGenerateTemplates(boolean generateTemplates)
 
- 
updateModuleRefs
public boolean updateModuleRefs(SRepository repository)
Expects at least model read access (although likely no reason to invoke in any other case but from write that modified smth)- Overrides:
 updateModuleRefsin classModuleDescriptor- Parameters:
 repository- where to look old/new module references up.
 
- 
getOutputPath
@Nullable public String getOutputPath()
FIXME Likely,SolutionDescriptor.getOutputPath(),LanguageDescriptor.getGenPath()and this one need to move to ModuleDescriptor. I would do that once there's clear idea whether to use IFile, java.io.File or Path for these locations, and whether to keep these as module descriptor attributes or inside relevantfacets.- Returns:
 - filesystem location where generated files for the generator go, or null if this module doesn't support output
 
 
- 
getCompileInMPS
public boolean getCompileInMPS()
- Overrides:
 getCompileInMPSin classModuleDescriptor
 
- 
getHeaderMarker
protected int getHeaderMarker()
- Overrides:
 getHeaderMarkerin classModuleDescriptor
 
- 
save
public void save(ModelOutputStream stream) throws IOException
- Overrides:
 savein classModuleDescriptor- Throws:
 IOException
 
- 
load
public void load(ModelInputStream stream) throws IOException
- Overrides:
 loadin classModuleDescriptor- Throws:
 IOException
 
- 
copy
@NotNull public GeneratorDescriptor copy()
- Specified by:
 copyin interfaceCopyable<ModuleDescriptor>- Overrides:
 copyin classModuleDescriptor- Returns:
 - full deep-copy of the T instance
 
 
 - 
 
 -