Package org.eclipse.epsilon.evl
Class EvlModule
- All Implemented Interfaces:
IModule,ModuleElement,IEolModule,IErlModule,IEvlModule
- Direct Known Subclasses:
EvlModuleParallel
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<ConstraintContext>protected final ArrayList<Constraint>protected final ArrayList<ConstraintContext>protected IEvlFixerstatic final StringFields inherited from class org.eclipse.epsilon.erl.ErlModule
declaredPost, declaredPre, post, preFields inherited from class org.eclipse.epsilon.eol.EolModule
context, declaredModelDeclarations, declaredOperations, imports, main, modelDeclarations, operations, postOperationStatementsFields inherited from class org.eclipse.epsilon.eol.AbstractModule
parseProblems, parser, sourceFile, sourceUri -
Constructor Summary
ConstructorsConstructorDescriptionEvlModule(IEvlContext context) Instantiates the module with the specified execution context. -
Method Summary
Modifier and TypeMethodDescriptionadapt(AST cst, ModuleElement parentAst) voidprotected voidInvokes the execute() method on all Constraints in all ConstraintContexts.voidConfigure the IEolModule with the given propertiesCreates an object that implements debugging (i.e.protected org.antlr.runtime.LexercreateLexer(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) booleanChecks if is optimize constraints.voidClean up, execute fixes and post block.protected voidprotected Collection<Constraint>preProcessConstraintContext(ConstraintContext constraintContext) protected Set<UnsatisfiedConstraint>Main rule processing logic.voidsetOptimizeConstraints(boolean optimizeConstraints) Sets the optimize constraints.voidMethods inherited from class org.eclipse.epsilon.erl.ErlModule
calculateSuperRules, execute, execute, executeImpl, getDeclaredPost, getDeclaredPre, getPost, getPre, prepareExecutionMethods inherited from class org.eclipse.epsilon.eol.EolModule
checkImports, clearCache, getDeclaredModelDeclarations, getDeclaredOperations, getImportManager, getImports, getImportsByExtension, getMain, getModelDeclarations, getOperations, getParentModule, getPostOperationStatements, setContext, setImportManager, setMain, setParentModule, toStringMethods inherited from class org.eclipse.epsilon.eol.AbstractModule
assignAnnotations, assignComment, assignComments, createAst, extractComments, getParseProblems, getSourceFile, getSourceUri, invokeMainRule, parse, parseMethods inherited from class org.eclipse.epsilon.common.module.AbstractModuleElement
equals, getChildren, getComments, getData, getDebugInfo, getFile, getModule, getParent, getRegion, getUri, hashCode, setModule, setParent, setRegion, setUriMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.epsilon.eol.IEolModule
getDeclaredModelDeclarations, getDeclaredOperations, getImportManager, getImports, getMain, getModelDeclarations, getOperations, getParentModule, getParseProblems, getPostOperationStatements, parse, setContext, setImportManager, setParentModuleMethods inherited from interface org.eclipse.epsilon.erl.IErlModule
getDeclaredPost, getDeclaredPre, getPost, getPreMethods inherited from interface org.eclipse.epsilon.evl.IEvlModule
getConstraint, getConstraintContextMethods inherited from interface org.eclipse.epsilon.common.module.IModule
createAst, getSourceUri, parse, parse, parse, parse, parseMethods 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:
createLexerin classErlModule
-
createParser
- Overrides:
createParserin classErlModule
-
getMainRule
- Overrides:
getMainRulein classErlModule
-
adapt
-
getImportConfiguration
- Overrides:
getImportConfigurationin classErlModule
-
build
- Specified by:
buildin interfaceModuleElement- Overrides:
buildin classErlModule
-
getDeclaredConstraintContexts
- Specified by:
getDeclaredConstraintContextsin interfaceIEvlModule
-
getConstraintContexts
- Specified by:
getConstraintContextsin 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:
prepareContextin classEolModule- Throws:
EolRuntimeException
-
processRules
Description copied from class:ErlModuleMain rule processing logic. Non-abstract for compatibility.- Overrides:
processRulesin 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:
postExecutionin classErlModule- Throws:
EolRuntimeException- Since:
- 1.6
-
execute
- Specified by:
executein interfaceIEolModule- Specified by:
executein interfaceIEvlModule- Overrides:
executein classEolModule- Throws:
EolRuntimeException- Since:
- 1.6
-
getContext
- Specified by:
getContextin interfaceIEolModule- Specified by:
getContextin interfaceIErlModule- Specified by:
getContextin interfaceIEvlModule- Overrides:
getContextin classErlModule
-
getConstraints
- Specified by:
getConstraintsin interfaceIEvlModule
-
setUnsatisfiedConstraintFixer
- Specified by:
setUnsatisfiedConstraintFixerin interfaceIEvlModule
-
getUnsatisfiedConstraintFixer
- Specified by:
getUnsatisfiedConstraintFixerin 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:IEolModuleConfigure the IEolModule with the given properties- Specified by:
configurein interfaceIEolModule- Parameters:
properties- a map of property:value- Since:
- 1.6
-
getConfigurationProperties
Description copied from interface:IEolModuleGet the set of property names that should be retrieved from the ILaunchConfiguration in order to configure this module.- Specified by:
getConfigurationPropertiesin interfaceIEolModule- Returns:
- Since:
- 1.6
-
createDebugger
Description copied from interface:IEolModuleCreates an object that implements debugging (i.e. breakpoints and stepping) for this module.- Specified by:
createDebuggerin interfaceIEolModule- Overrides:
createDebuggerin classEolModule
-