Package org.eclipse.epsilon.evl
Class EvlModule
- All Implemented Interfaces:
IModule
,ModuleElement
,IEolModule
,IErlModule
,IEvlModule
- Direct Known Subclasses:
EvlModuleParallel
-
Field Summary
Modifier and TypeFieldDescriptionprotected List<ConstraintContext>
protected final ArrayList<Constraint>
protected final ArrayList<ConstraintContext>
protected IEvlFixer
static final String
Fields inherited from class org.eclipse.epsilon.erl.ErlModule
declaredPost, declaredPre, post, pre
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
ConstructorDescriptionEvlModule
(IEvlContext context) Instantiates the module with the specified execution context. -
Method Summary
Modifier and TypeMethodDescriptionadapt
(AST cst, ModuleElement parentAst) void
protected void
Invokes the execute() method on all Constraints in all ConstraintContexts.void
Configure the IEolModule with the given propertiesCreates an object that implements debugging (i.e.protected org.antlr.runtime.Lexer
createLexer
(org.antlr.runtime.ANTLRInputStream inputStream) createParser
(org.antlr.runtime.TokenStream tokenStream) execute()
Get the set of property names that should be retrieved from the ILaunchConfiguration in order to configure this module.protected Collection<Constraint>
getOptimisedConstraintsFor
(ConstraintContext constraintContext) boolean
Checks if is optimize constraints.void
Clean up, execute fixes and post block.protected void
protected Collection<Constraint>
preProcessConstraintContext
(ConstraintContext constraintContext) protected Set<UnsatisfiedConstraint>
Main rule processing logic.void
setOptimizeConstraints
(boolean optimizeConstraints) Sets the optimize constraints.void
Methods inherited from class org.eclipse.epsilon.erl.ErlModule
calculateSuperRules, execute, execute, executeImpl, getDeclaredPost, getDeclaredPre, getPost, getPre, prepareExecution
Methods inherited from class org.eclipse.epsilon.eol.EolModule
checkImports, clearCache, getDeclaredModelDeclarations, getDeclaredOperations, getImportManager, getImports, getImportsByExtension, getMain, getModelDeclarations, getOperations, getParentModule, getPostOperationStatements, setContext, setImportManager, setMain, setParentModule, toString
Methods inherited from class org.eclipse.epsilon.eol.AbstractModule
assignAnnotations, assignComment, assignComments, createAst, extractComments, getParseProblems, getSourceFile, getSourceUri, invokeMainRule, parse, parse
Methods inherited from class org.eclipse.epsilon.common.module.AbstractModuleElement
equals, getChildren, 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
getDeclaredModelDeclarations, getDeclaredOperations, getImportManager, getImports, getMain, getModelDeclarations, getOperations, getParentModule, getParseProblems, getPostOperationStatements, parse, setContext, setImportManager, setParentModule
Methods inherited from interface org.eclipse.epsilon.erl.IErlModule
getDeclaredPost, getDeclaredPre, getPost, getPre
Methods inherited from interface org.eclipse.epsilon.evl.IEvlModule
getConstraint, getConstraintContext
Methods inherited from interface org.eclipse.epsilon.common.module.IModule
createAst, getSourceUri, parse, parse, parse, parse, parse
Methods inherited from interface org.eclipse.epsilon.common.module.ModuleElement
getChildren, getComments, getData, getFile, getModule, getParent, getRegion, getUri, setModule, setParent, setRegion, setUri
-
Field Details
-
fixer
-
constraintContexts
-
declaredConstraintContexts
-
constraints
-
OPTIMIZE_CONSTRAINTS
- See Also:
-
CONFIG_PROPERTIES
-
-
Constructor Details
-
EvlModule
public EvlModule() -
EvlModule
Instantiates the module with the specified execution context.- Parameters:
context
- The execution context- Since:
- 1.6
-
-
Method Details
-
createLexer
protected org.antlr.runtime.Lexer createLexer(org.antlr.runtime.ANTLRInputStream inputStream) - Overrides:
createLexer
in classErlModule
-
createParser
- Overrides:
createParser
in classErlModule
-
getMainRule
- Overrides:
getMainRule
in classErlModule
-
adapt
-
getImportConfiguration
- Overrides:
getImportConfiguration
in classErlModule
-
build
- Specified by:
build
in interfaceModuleElement
- Overrides:
build
in classErlModule
-
getDeclaredConstraintContexts
- Specified by:
getDeclaredConstraintContexts
in interfaceIEvlModule
-
getConstraintContexts
- Specified by:
getConstraintContexts
in interfaceIEvlModule
-
getOptimisedConstraintsFor
protected Collection<Constraint> getOptimisedConstraintsFor(ConstraintContext constraintContext) throws EolRuntimeException - Parameters:
constraintContext
-- Returns:
- Throws:
EolRuntimeException
- Since:
- 1.6
-
preProcessConstraintContext
protected Collection<Constraint> preProcessConstraintContext(ConstraintContext constraintContext) throws EolRuntimeException - Parameters:
constraintContext
-- Returns:
- Throws:
EolRuntimeException
- Since:
- 1.6
-
prepareContext
- Overrides:
prepareContext
in classEolModule
- Throws:
EolRuntimeException
-
processRules
Description copied from class:ErlModule
Main rule processing logic. Non-abstract for compatibility.- Overrides:
processRules
in classErlModule
- Returns:
- The result of executing this module.
- Throws:
EolRuntimeException
-
checkConstraints
Invokes the execute() method on all Constraints in all ConstraintContexts. If optimizeConstraints, the constraints to be checked are filtered.- Throws:
EolRuntimeException
- Since:
- 1.6
-
postExecution
Clean up, execute fixes and post block.- Overrides:
postExecution
in classErlModule
- Throws:
EolRuntimeException
- Since:
- 1.6
-
execute
- Specified by:
execute
in interfaceIEolModule
- Specified by:
execute
in interfaceIEvlModule
- Overrides:
execute
in classEolModule
- Throws:
EolRuntimeException
- Since:
- 1.6
-
getContext
- Specified by:
getContext
in interfaceIEolModule
- Specified by:
getContext
in interfaceIErlModule
- Specified by:
getContext
in interfaceIEvlModule
- Overrides:
getContext
in classErlModule
-
getConstraints
- Specified by:
getConstraints
in interfaceIEvlModule
-
setUnsatisfiedConstraintFixer
- Specified by:
setUnsatisfiedConstraintFixer
in interfaceIEvlModule
-
getUnsatisfiedConstraintFixer
- Specified by:
getUnsatisfiedConstraintFixer
in interfaceIEvlModule
-
isOptimizeConstraints
public boolean isOptimizeConstraints()Checks if is optimize constraints.- Returns:
- true, if is optimize constraints
-
setOptimizeConstraints
public void setOptimizeConstraints(boolean optimizeConstraints) Sets the optimize constraints.- Parameters:
optimizeConstraints
- the new optimize constraints
-
configure
Description copied from interface:IEolModule
Configure the IEolModule with the given properties- Specified by:
configure
in interfaceIEolModule
- Parameters:
properties
- a map of property:value- Since:
- 1.6
-
getConfigurationProperties
Description copied from interface:IEolModule
Get the set of property names that should be retrieved from the ILaunchConfiguration in order to configure this module.- Specified by:
getConfigurationProperties
in interfaceIEolModule
- Returns:
- Since:
- 1.6
-
createDebugger
Description copied from interface:IEolModule
Creates an object that implements debugging (i.e. breakpoints and stepping) for this module.- Specified by:
createDebugger
in interfaceIEolModule
- Overrides:
createDebugger
in classEolModule
-