Package org.eclipse.epsilon.egl.internal
Class EglModule
- java.lang.Object
-
- org.eclipse.epsilon.common.module.AbstractModuleElement
-
- org.eclipse.epsilon.eol.AbstractModule
-
- org.eclipse.epsilon.eol.EolModule
-
- org.eclipse.epsilon.egl.internal.EglModule
-
- All Implemented Interfaces:
IModule
,ModuleElement
,IEglModule
,IEolModule
public class EglModule extends EolModule implements IEglModule
Used internally byEglTemplateFactory
andEglTemplate
to parse and execute EGL, by transforming to EOL. Most extensions should subclassEglTemplateFactory
and/orEglTemplate
rather than this class.- Author:
- lrose, Sina Madani
-
-
Field Summary
Fields Modifier and Type Field Description protected EglParser
eglParser
-
Fields inherited from class org.eclipse.epsilon.eol.EolModule
context, declaredModelDeclarations, declaredOperations, imports, main, modelDeclarations, operations, postOperationStatements
-
Fields inherited from class org.eclipse.epsilon.eol.AbstractModule
parseProblems, parser, sourceFile, sourceUri
-
-
Constructor Summary
Constructors Constructor Description EglModule()
EglModule(IEglContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ModuleElement
adapt(AST cst, ModuleElement parentAst)
void
build(AST cst, IModule module)
Object
execute(EglTemplate template, Formatter postprocessor)
List<ModuleElement>
getChildren()
IEglContext
getContext()
protected HashMap<String,Class<?>>
getImportConfiguration()
List<EglMarkerSection>
getMarkers()
List<ParseProblem>
getParseProblems()
protected boolean
hasAnnotation(AST ast, String name)
boolean
parse(String code, File file)
boolean
parse(URI uri)
protected boolean
preprocess(AST ast)
-
Methods inherited from class org.eclipse.epsilon.eol.EolModule
checkImports, clearCache, createLexer, createParser, execute, executeImpl, getDeclaredModelDeclarations, getDeclaredOperations, getImports, getImportsByExtension, getMain, getMainRule, getModelDeclarations, getOperations, getParentModule, getPostOperationStatements, prepareContext, setContext, setMain, setParentModule, toString
-
Methods inherited from class org.eclipse.epsilon.eol.AbstractModule
assignAnnotations, assignComment, assignComments, createAst, extractComments, getSourceFile, getSourceUri, invokeMainRule
-
Methods inherited from class org.eclipse.epsilon.common.module.AbstractModuleElement
equals, getComments, getData, getDebugInfo, getFile, getModule, getParent, getRegion, getUri, hashCode, setModule, setParent, setRegion, setUri
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.epsilon.eol.IEolModule
configure, execute, getConfigurationProperties, getDeclaredModelDeclarations, getDeclaredOperations, getImports, getMain, getModelDeclarations, getOperations, getParentModule, getPostOperationStatements, setContext, setParentModule
-
-
-
-
Field Detail
-
eglParser
protected EglParser eglParser
-
-
Constructor Detail
-
EglModule
public EglModule()
-
EglModule
public EglModule(IEglContext context)
-
-
Method Detail
-
build
public void build(AST cst, IModule module)
- Specified by:
build
in interfaceModuleElement
- Overrides:
build
in classEolModule
-
parse
public boolean parse(String code, File file) throws Exception
- Specified by:
parse
in interfaceIEolModule
- Specified by:
parse
in interfaceIModule
- Overrides:
parse
in classAbstractModule
- Throws:
Exception
-
parse
public boolean parse(URI uri) throws Exception
- Specified by:
parse
in interfaceIModule
- Overrides:
parse
in classAbstractModule
- Throws:
Exception
-
adapt
public ModuleElement adapt(AST cst, ModuleElement parentAst)
-
getMarkers
public List<EglMarkerSection> getMarkers()
- Specified by:
getMarkers
in interfaceIEglModule
-
execute
public Object execute(EglTemplate template, Formatter postprocessor) throws EglRuntimeException
- Specified by:
execute
in interfaceIEglModule
- Throws:
EglRuntimeException
-
getParseProblems
public List<ParseProblem> getParseProblems()
- Specified by:
getParseProblems
in interfaceIEolModule
- Specified by:
getParseProblems
in interfaceIModule
- Overrides:
getParseProblems
in classAbstractModule
-
getChildren
public List<ModuleElement> getChildren()
- Specified by:
getChildren
in interfaceModuleElement
- Overrides:
getChildren
in classAbstractModuleElement
-
getImportConfiguration
protected HashMap<String,Class<?>> getImportConfiguration()
- Overrides:
getImportConfiguration
in classEolModule
-
getContext
public IEglContext getContext()
- Specified by:
getContext
in interfaceIEglModule
- Specified by:
getContext
in interfaceIEolModule
- Overrides:
getContext
in classEolModule
-
preprocess
protected boolean preprocess(AST ast)
-
-