public abstract class AbstractGeneratorFragment extends DefaultGeneratorFragment implements NamingAware
Constructor and Description |
---|
AbstractGeneratorFragment() |
Modifier and Type | Method and Description |
---|---|
void |
addToPluginXmlRt(Grammar grammar,
org.eclipse.xpand2.XpandExecutionContext ctx)
Used to add code to the plugin.xml of the runtime bundle.
|
void |
addToPluginXmlTests(Grammar grammar,
org.eclipse.xpand2.XpandExecutionContext ctx)
Deprecated.
|
void |
addToPluginXmlUi(Grammar grammar,
org.eclipse.xpand2.XpandExecutionContext ctx)
Used to add code to the plugin.xml of the ui bundle.
|
void |
addToStandaloneSetup(Grammar grammar,
org.eclipse.xpand2.XpandExecutionContext ctx)
Used to add code to the generated 'public void register(Injector injector)'-method
|
void |
generate(Grammar grammar,
org.eclipse.xpand2.XpandExecutionContext ctx)
can be used to generate whatever necessary
|
Naming |
getNaming() |
protected java.util.List<java.lang.Object> |
getParameters(Grammar grammar) |
protected java.lang.String |
getTemplate() |
protected java.lang.String |
readFileIntoString(java.lang.String filename,
java.nio.charset.Charset encoding) |
void |
registerNaming(Naming naming) |
protected void |
writeStringIntoFile(java.lang.String filename,
java.lang.String content,
java.nio.charset.Charset encoding) |
addToPluginXmlRt, addToPluginXmlUi, addToStandaloneSetup, checkConfiguration, generate, getExportedPackagesIde, getExportedPackagesRt, getExportedPackagesTests, getExportedPackagesUi, getGuiceBindingsRt, getGuiceBindingsUi, getImportedPackagesIde, getImportedPackagesRt, getImportedPackagesTests, getImportedPackagesUi, getRequiredBundlesIde, getRequiredBundlesRt, getRequiredBundlesTests, getRequiredBundlesUi
public void registerNaming(Naming naming)
registerNaming
in interface NamingAware
public Naming getNaming()
protected java.lang.String getTemplate()
public void generate(Grammar grammar, org.eclipse.xpand2.XpandExecutionContext ctx)
IGeneratorFragment
generate
in interface IGeneratorFragment
generate
in class DefaultGeneratorFragment
ctx
- - the execution context to usepublic void addToPluginXmlRt(Grammar grammar, org.eclipse.xpand2.XpandExecutionContext ctx)
IGeneratorFragment
addToPluginXmlRt
in interface IGeneratorFragment
addToPluginXmlRt
in class DefaultGeneratorFragment
ctx
- - the execution context to use (the plugin.xml file is already opened)public void addToPluginXmlUi(Grammar grammar, org.eclipse.xpand2.XpandExecutionContext ctx)
IGeneratorFragment
addToPluginXmlUi
in interface IGeneratorFragment
addToPluginXmlUi
in class DefaultGeneratorFragment
ctx
- - the execution context to use (the plugin.xml file is already opened)@Deprecated public void addToPluginXmlTests(Grammar grammar, org.eclipse.xpand2.XpandExecutionContext ctx)
IGeneratorFragmentExtension
addToPluginXmlTests
in interface IGeneratorFragmentExtension
addToPluginXmlTests
in class DefaultGeneratorFragment
ctx
- - the execution context to use (the plugin.xml file is already opened)public void addToStandaloneSetup(Grammar grammar, org.eclipse.xpand2.XpandExecutionContext ctx)
IGeneratorFragment
addToStandaloneSetup
in interface IGeneratorFragment
addToStandaloneSetup
in class DefaultGeneratorFragment
ctx
- - the execution context to use (the file is already opened, content goes into the register method)protected java.util.List<java.lang.Object> getParameters(Grammar grammar)
protected java.lang.String readFileIntoString(java.lang.String filename, java.nio.charset.Charset encoding)
protected void writeStringIntoFile(java.lang.String filename, java.lang.String content, java.nio.charset.Charset encoding)