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
-
Field Summary
Fields inherited from class org.eclipse.epsilon.egl.EglPersistentTemplate
outputRoot, outputRootPath
Fields inherited from class org.eclipse.epsilon.egl.EglTemplate
listeners, module, name, template
-
Constructor Summary
ModifierConstructorDescriptionprotected
EglFileGeneratingTemplate
(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 void
protected void
doGenerate
(File target, String targetName, boolean overwrite, boolean merge) Store result of processing template in the given file.protected boolean
protected void
void
setCurrentOutputFile
(OutputFile currentOutputFile) void
setExistingContents
(String existingContents) void
setNewContents
(String newContents) void
setOutputMode
(EglFileGeneratingTemplate.OutputMode outputMode) void
setPositiveMessage
(String positiveMessage) void
void
setTargetName
(String targetName) protected void
write()
protected File
write
(String path, EglFileGeneratingTemplate.OutputMode outputMode) protected void
Methods inherited from class org.eclipse.epsilon.egl.EglPersistentTemplate
addMessage, generate, generate, name, resolveFile, store, store
Methods 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:EglPersistentTemplate
Store 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:
doGenerate
in classEglPersistentTemplate
- Throws:
EglRuntimeException
-
prepareNewContents
- Throws:
EglRuntimeException
-
writeNewContentsIfDifferentFromExistingContents
protected void writeNewContentsIfDifferentFromExistingContents() throws URISyntaxException, IOException- Throws:
URISyntaxException
IOException
-
isOverwriteUnchangedFiles
protected boolean isOverwriteUnchangedFiles() -
write
- Throws:
IOException
URISyntaxException
-
addProtectedRegionWarning
- Overrides:
addProtectedRegionWarning
in classEglTemplate
-
getTarget
-
setTarget
-
getTargetName
-
setTargetName
-
getCurrentOutputFile
-
setCurrentOutputFile
-
getExistingContents
-
setExistingContents
-
getNewContents
-
setNewContents
-
getPositiveMessage
-
setPositiveMessage
-
getOutputMode
-
setOutputMode
-