org.eclipse.xtext.generator
Interface IGeneratorFragment

All Known Implementing Classes:
AbstractAntlrGeneratorFragment, AbstractAntlrGeneratorFragmentEx, AbstractGeneratorFragment, AbstractInheritingGeneratorFragment, AbstractScopingFragment, AntlrDelegatingFragment, AntlrGeneratorFragment, BasicUiGeneratorFragment, BuilderIntegrationFragment, CodetemplatesGeneratorFragment, CodetemplatesGeneratorFragment, CompareFragment, CompositeGeneratorFragment, ContentAssistParserGeneratorFragment, DebugAntlrGeneratorFragment, DefaultGeneratorFragment, DelegatingGeneratorFragment, Ecore2XtextValueConverterServiceFragment, EcoreGeneratorFragment, ExternalAntlrLexerFragment, FormatterFragment, FormatterFragment, GeneratorFragment, GrammarAccessFragment, ImplicitRuntimeFragment, ImplicitUiFragment, ImportNamespacesScopingFragment, ImportURIScopingFragment, JavaBasedContentAssistFragment, JavaValidatorFragment, Junit4Fragment, LabelProviderFragment, LanguageConfig, LoggingGeneratorFragment, OutlineTreeProviderFragment, ParseTreeConstructorFragment, QualifiedNamesFragment, QuickfixProviderFragment, QuickOutlineFragment, RefactorElementNameFragment, ResourceFactoryFragment, SerializerFragment, SimpleNamesFragment, SimpleProjectWizardFragment, SubPackageAwareGrammarAccessFragment, TypesGeneratorFragment, XbaseGeneratorFragment, Xtend2GeneratorFragment, XtextAntlrGeneratorFragment, XtextAntlrUiGeneratorFragment

public interface IGeneratorFragment

Author:
Sven Efftinge - Initial contribution and API primary hook, allowing configuration and contribution to Generator

Method Summary
 void addToPluginXmlRt(Grammar grammar, org.eclipse.xpand2.XpandExecutionContext ctx)
          Used to add code to the plugin.xml of the runtime bundle.
 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 checkConfiguration(org.eclipse.emf.mwe.core.issues.Issues issues)
          Called by the container after configuration so the component can validate the configuration before invocation.
 void generate(Grammar grammar, org.eclipse.xpand2.XpandExecutionContext ctx)
          can be used to generate whatever necessary
 java.lang.String[] getExportedPackagesRt(Grammar grammar)
          return the exported packages for the runtime bundle
 java.lang.String[] getExportedPackagesUi(Grammar grammar)
          return the exported packages for the ui bundle
 java.util.Set<Binding> getGuiceBindingsRt(Grammar grammar)
          return a map containing the contributed guice bindings created in this generator fragment
 java.util.Set<Binding> getGuiceBindingsUi(Grammar grammar)
          return a map containing the contributed guice bindings for the ui part created in this generator fragment
 java.lang.String[] getImportedPackagesRt(Grammar grammar)
          return the imported packages for the runtime bundle
 java.lang.String[] getImportedPackagesUi(Grammar grammar)
          return the imported packages for the ui bundle
 java.lang.String[] getRequiredBundlesRt(Grammar grammar)
          return the bundles this fragment requires at runtime
 java.lang.String[] getRequiredBundlesUi(Grammar grammar)
          return the bundles this fragment requires in ui
 

Method Detail

checkConfiguration

void checkConfiguration(org.eclipse.emf.mwe.core.issues.Issues issues)
Called by the container after configuration so the component can validate the configuration before invocation.

Parameters:
issues - implementors should report configuration issues to this.

generate

void generate(Grammar grammar,
              org.eclipse.xpand2.XpandExecutionContext ctx)
can be used to generate whatever necessary

Parameters:
grammar -
ctx - - the execution context to use

addToStandaloneSetup

void addToStandaloneSetup(Grammar grammar,
                          org.eclipse.xpand2.XpandExecutionContext ctx)
Used to add code to the generated 'public void register(Injector injector)'-method

Parameters:
grammar -
ctx - - the execution context to use (the file is already opened, content goes into the register method)

addToPluginXmlRt

void addToPluginXmlRt(Grammar grammar,
                      org.eclipse.xpand2.XpandExecutionContext ctx)
Used to add code to the plugin.xml of the runtime bundle. The surrounding tags are added automatically

Parameters:
grammar -
ctx - - the execution context to use (the plugin.xml file is already opened)

addToPluginXmlUi

void addToPluginXmlUi(Grammar grammar,
                      org.eclipse.xpand2.XpandExecutionContext ctx)
Used to add code to the plugin.xml of the ui bundle. The surrounding tags are added automatically

Parameters:
grammar -
ctx - - the execution context to use (the plugin.xml file is already opened)

getGuiceBindingsRt

java.util.Set<Binding> getGuiceBindingsRt(Grammar grammar)
return a map containing the contributed guice bindings created in this generator fragment

Parameters:
grammar -

getGuiceBindingsUi

java.util.Set<Binding> getGuiceBindingsUi(Grammar grammar)
return a map containing the contributed guice bindings for the ui part created in this generator fragment

Parameters:
grammar -

getRequiredBundlesRt

java.lang.String[] getRequiredBundlesRt(Grammar grammar)
return the bundles this fragment requires at runtime

Parameters:
grammar -

getExportedPackagesRt

java.lang.String[] getExportedPackagesRt(Grammar grammar)
return the exported packages for the runtime bundle

Parameters:
grammar -

getImportedPackagesRt

java.lang.String[] getImportedPackagesRt(Grammar grammar)
return the imported packages for the runtime bundle

Parameters:
grammar -

getRequiredBundlesUi

java.lang.String[] getRequiredBundlesUi(Grammar grammar)
return the bundles this fragment requires in ui

Parameters:
grammar -

getExportedPackagesUi

java.lang.String[] getExportedPackagesUi(Grammar grammar)
return the exported packages for the ui bundle

Parameters:
grammar -

getImportedPackagesUi

java.lang.String[] getImportedPackagesUi(Grammar grammar)
return the imported packages for the ui bundle

Parameters:
grammar -