org.eclipse.xtext.generator.grammarAccess
Class GrammarAccessFragment
java.lang.Object
org.eclipse.xtext.generator.DefaultGeneratorFragment
org.eclipse.xtext.generator.AbstractGeneratorFragment
org.eclipse.xtext.generator.grammarAccess.GrammarAccessFragment
- All Implemented Interfaces:
- IGeneratorFragment, NamingAware
- Direct Known Subclasses:
- SubPackageAwareGrammarAccessFragment
public class GrammarAccessFragment
- extends AbstractGeneratorFragment
A grammar access fragment that handles subpackages of EPackages gracefully. In general, we recommend to avoid
nested EPackages if possible.
- Author:
- Jan Koehnlein - Initial contribution and API, Sebastian Zarnekow - Initial contribution and API
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GrammarAccessFragment
public GrammarAccessFragment()
getTemplate
protected java.lang.String getTemplate()
- Overrides:
getTemplate
in class AbstractGeneratorFragment
getGuiceBindingsRt
public java.util.Set<Binding> getGuiceBindingsRt(Grammar grammar)
- Description copied from interface:
IGeneratorFragment
- return a map containing the contributed guice bindings created in this generator fragment
- Specified by:
getGuiceBindingsRt
in interface IGeneratorFragment
- Overrides:
getGuiceBindingsRt
in class AbstractGeneratorFragment
getExportedPackagesRt
public java.lang.String[] getExportedPackagesRt(Grammar grammar)
- Description copied from interface:
IGeneratorFragment
- return the exported packages for the runtime bundle
- Specified by:
getExportedPackagesRt
in interface IGeneratorFragment
- Overrides:
getExportedPackagesRt
in class AbstractGeneratorFragment
generate
public void generate(Grammar grammar,
org.eclipse.xpand2.XpandExecutionContext ctx)
- Description copied from interface:
IGeneratorFragment
- can be used to generate whatever necessary
- Specified by:
generate
in interface IGeneratorFragment
- Overrides:
generate
in class AbstractGeneratorFragment
ctx
- - the execution context to use
deepCopy
public Grammar deepCopy(Grammar grammar,
ResourceSaveIndicator isSaving)
addAllGrammarsToResource
public void addAllGrammarsToResource(org.eclipse.emf.ecore.resource.Resource resource,
Grammar grammar,
java.util.Set<Grammar> visitedGrammars)
replaceResourceURIsWithNsURIs
public void replaceResourceURIsWithNsURIs(Grammar grammar,
org.eclipse.emf.ecore.resource.ResourceSet set)
moveSubpackagesToNewResource
public void moveSubpackagesToNewResource(org.eclipse.emf.ecore.EPackage pack,
org.eclipse.emf.ecore.resource.ResourceSet set)
setXmlVersion
public void setXmlVersion(java.lang.String xmlVersion)
getXmlVersion
public java.lang.String getXmlVersion()