diff options
Diffstat (limited to 'rba.tool.editor/src/rba/tool/editor/generator/rtmodel')
-rw-r--r-- | rba.tool.editor/src/rba/tool/editor/generator/rtmodel/AbstractRTModelUpdater.xtend | 23 | ||||
-rw-r--r-- | rba.tool.editor/src/rba/tool/editor/generator/rtmodel/IRTModelUpdater.xtend | 15 |
2 files changed, 38 insertions, 0 deletions
diff --git a/rba.tool.editor/src/rba/tool/editor/generator/rtmodel/AbstractRTModelUpdater.xtend b/rba.tool.editor/src/rba/tool/editor/generator/rtmodel/AbstractRTModelUpdater.xtend new file mode 100644 index 0000000..4435813 --- /dev/null +++ b/rba.tool.editor/src/rba/tool/editor/generator/rtmodel/AbstractRTModelUpdater.xtend @@ -0,0 +1,23 @@ +package rba.tool.editor.generator.rtmodel + +import org.eclipse.emf.ecore.resource.Resource +import org.eclipse.emf.ecore.resource.ResourceSet +import org.eclipse.xtext.generator.AbstractGenerator +import org.eclipse.xtext.generator.IFileSystemAccess2 +import org.eclipse.xtext.generator.IGeneratorContext + +abstract class AbstractRTModelUpdater extends AbstractGenerator implements IRTModelUpdater { + + override doGenerate(Resource input, IFileSystemAccess2 fsa, IGeneratorContext context) { + doGenerate(input.resourceSet, fsa, context); + } + + override beforeGenerate(ResourceSet input, IFileSystemAccess2 fsa, IGeneratorContext context) { + } + + override afterGenerate(ResourceSet input, IFileSystemAccess2 fsa, IGeneratorContext context) { + } + +// override doGenerate(ResourceSet resourceSet, IFileSystemAccess2 fsa, IGeneratorContext context) { +// } +} diff --git a/rba.tool.editor/src/rba/tool/editor/generator/rtmodel/IRTModelUpdater.xtend b/rba.tool.editor/src/rba/tool/editor/generator/rtmodel/IRTModelUpdater.xtend new file mode 100644 index 0000000..010e508 --- /dev/null +++ b/rba.tool.editor/src/rba/tool/editor/generator/rtmodel/IRTModelUpdater.xtend @@ -0,0 +1,15 @@ +package rba.tool.editor.generator.rtmodel + +import org.eclipse.emf.ecore.resource.ResourceSet +import org.eclipse.xtext.generator.IFileSystemAccess2 +import org.eclipse.xtext.generator.IGenerator2 +import org.eclipse.xtext.generator.IGeneratorContext + +interface IRTModelUpdater extends IGenerator2 { + + def void doGenerate(ResourceSet input, IFileSystemAccess2 fsa, IGeneratorContext context); + + def void beforeGenerate(ResourceSet input, IFileSystemAccess2 fsa, IGeneratorContext context); + + def void afterGenerate(ResourceSet input, IFileSystemAccess2 fsa, IGeneratorContext context); +} |