public class FileGenerationExporter extends Object implements GenerationExporter
| Constructor and Description |
|---|
FileGenerationExporter() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
askOverwriteAllowed(String fileName)
Ask the user if a file shall be overwritten.
|
void |
export(Collection<? extends GenerationInfo> generationInfos,
UserInteraction userInteraction)
Export the given
GenerationInfos' content. |
protected void |
export(GenerationInfo generationInfo)
Export the given
GenerationInfo. |
protected void |
export(String exportString,
org.eclipse.emf.common.util.URI location)
Exports the given string to the given
location. |
protected String |
wrapGeneration(GenerationInfo generationInfo)
Wraps the generated content if needed.
|
public void export(Collection<? extends GenerationInfo> generationInfos, UserInteraction userInteraction) throws IOException
GenerationExporterGenerationInfos' content.export in interface GenerationExportergenerationInfos - A collection of GenerationInfos which shall be exported.userInteraction - Handles the communication with the user.IOException - If something went wrong during export.protected void export(GenerationInfo generationInfo) throws IOException
GenerationInfo.generationInfo - The GenerationInfo to export.IOException - If something went wrong during export.protected String wrapGeneration(GenerationInfo generationInfo)
generationInfo - The GenerationInfo containing the information.protected void export(String exportString, org.eclipse.emf.common.util.URI location) throws IOException
location.exportString - The string to export.location - The URI depicting the location to export to.IOException - If something went wrong during export.protected boolean askOverwriteAllowed(String fileName)
fileName - The name of the file displayed to the user.true if the file shall be overwritten, false otherwise.Copyright © 2017. All rights reserved.