Package org.eclipse.epsilon.egl
Class EglFileGeneratingTemplate
java.lang.Object
org.eclipse.epsilon.egl.EglTemplate
org.eclipse.epsilon.egl.EglPersistentTemplate
org.eclipse.epsilon.egl.EglFileGeneratingTemplate
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class org.eclipse.epsilon.egl.EglPersistentTemplate
outputRoot, outputRootPathFields inherited from class org.eclipse.epsilon.egl.EglTemplate
listeners, module, name, template -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedEglFileGeneratingTemplate(URI path, IEglContext context, URI outputRoot) EglFileGeneratingTemplate(EglTemplateSpecification spec, IEglContext context, URI outputRoot) EglFileGeneratingTemplate(EglTemplateSpecification spec, IEglContext context, URI outputRoot, String outputRootPath) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voiddoGenerate(File target, String targetName, boolean overwrite, boolean merge) Store result of processing template in the given file.protected booleanprotected voidvoidsetCurrentOutputFile(OutputFile currentOutputFile) voidsetExistingContents(String existingContents) voidsetNewContents(String newContents) voidsetOutputMode(EglFileGeneratingTemplate.OutputMode outputMode) voidsetPositiveMessage(String positiveMessage) voidvoidsetTargetName(String targetName) protected voidwrite()protected Filewrite(String path, EglFileGeneratingTemplate.OutputMode outputMode) protected voidMethods inherited from class org.eclipse.epsilon.egl.EglPersistentTemplate
addMessage, generate, generate, name, resolveFile, store, storeMethods inherited from class org.eclipse.epsilon.egl.EglTemplate
getContents, getDeclaredModelDefinitions, getDeclaredOperations, getFormatter, getImports, getIncrementalitySettings, getModelDefinitions, getModule, getName, getOperations, getParseProblems, getTemplate, isProcessed, merge, populate, printWarning, process, reset, setFormatter, setFormatters, setFormatters, setIncrementalitySettings
-
Constructor Details
-
EglFileGeneratingTemplate
- Throws:
Exception
-
EglFileGeneratingTemplate
public EglFileGeneratingTemplate(EglTemplateSpecification spec, IEglContext context, URI outputRoot, String outputRootPath) throws Exception - Throws:
Exception
-
EglFileGeneratingTemplate
public EglFileGeneratingTemplate(EglTemplateSpecification spec, IEglContext context, URI outputRoot) throws Exception - Parameters:
spec-context-outputRoot-- Throws:
Exception- Since:
- 1.6
-
-
Method Details
-
append
- Throws:
EglRuntimeException
-
patch
- Throws:
EglRuntimeException
-
write
protected File write(String path, EglFileGeneratingTemplate.OutputMode outputMode) throws EglRuntimeException - Throws:
EglRuntimeException
-
doGenerate
protected void doGenerate(File target, String targetName, boolean overwrite, boolean merge) throws EglRuntimeException Description copied from class:EglPersistentTemplateStore result of processing template in the given file. Subclasses should override to implement the specific semantics of 'storing' to a file. The result of processing the template will be available fromEglTemplate.contents.- Specified by:
doGeneratein classEglPersistentTemplate- Throws:
EglRuntimeException
-
prepareNewContents
- Throws:
EglRuntimeException
-
writeNewContentsIfDifferentFromExistingContents
protected void writeNewContentsIfDifferentFromExistingContents() throws URISyntaxException, IOException- Throws:
URISyntaxExceptionIOException
-
isOverwriteUnchangedFiles
protected boolean isOverwriteUnchangedFiles() -
write
- Throws:
IOExceptionURISyntaxException
-
addProtectedRegionWarning
- Overrides:
addProtectedRegionWarningin classEglTemplate
-
getTarget
-
setTarget
-
getTargetName
-
setTargetName
-
getCurrentOutputFile
-
setCurrentOutputFile
-
getExistingContents
-
setExistingContents
-
getNewContents
-
setNewContents
-
getPositiveMessage
-
setPositiveMessage
-
getOutputMode
-
setOutputMode
-