MetaDone
|
Public Member Functions | |
GrasylaInterpreter (GrasylaContext context, Engine parent) throws BadPreCondition | |
final Set< String > | getFeatures () |
Object | configure () throws BadPreCondition |
void | refresh () |
Protected Member Functions | |
void | notifyChildChanged (Engine child, ChildComponent comp) |
Package Functions | |
protected< C > Component <?extends C > | buildNewComponent (Class< C > clComp) throws BadPreCondition |
Private Member Functions | |
ScriptResult | runInitScript (ScriptEvaluator eval, String script) |
Static Private Member Functions | |
static String | getInitScript (GrasylaScript script, ProgLanguage lang) |
static void | getInitScript (GrasylaScript script, ProgLanguage lang, StringBuilder s, Set< GrasylaScript > done) |
Static Private Attributes | |
static final Logger | logger = Logger.getLogger(GrasylaInterpreter.class) |
An interpreter that displays engines using a grasyla script.
The selector defines the strategy to choose the best equation for an object.
metadone.client.grasyla2.GrasylaInterpreter.GrasylaInterpreter | ( | GrasylaContext | context, |
Engine | parent | ||
) | throws BadPreCondition |
Creates a new interpreter.
co | The represented object |
expression | The expression |
parent | The parent engine |
BadPreCondition |
References metadone.client.grasyla2.GrasylaEngine.context, metadone.client.grasyla2.GrasylaEngine.dispose(), metadone.util.MapFcts.equal(), metadone.client.grasyla2.GrasylaEngine.getContext(), metadone.client.grasyla2.GrasylaContext.getEquation(), metadone.metabusiness.events.EventObject.getObject, metadone.metabusiness.syntax.grasyla.GrasylaEquation.getRHS(), metadone.metabusiness.syntax.View.getScript(), metadone.metabusiness.syntax.View.getTarget(), metadone.client.grasyla2.GrasylaContext.getView(), metadone.client.grasyla2.GrasylaEngine.parent, metadone.client.grasyla2.GrasylaInterpreter.refresh(), metadone.client.grasyla2.GrasylaEngine.registerSubscriber(), and metadone.client.grasyla2.GrasylaEngine.trigger().
protected<C> Component<? extends C> metadone.client.grasyla2.GrasylaInterpreter.buildNewComponent | ( | Class< C > | clComp | ) | throws BadPreCondition [package, virtual] |
Builds a new component.
<C> | The type |
clComp | The class |
BadPreCondition |
Implements metadone.client.grasyla2.GrasylaEngine.
References metadone.client.grasyla2.GrasylaEngine.buildChild(), metadone.client.grasyla2.GrasylaEngineFactory.buildFor(), metadone.client.grasyla2.GrasylaEngine.getContext(), metadone.client.grasyla2.GrasylaEngine.getExpression(), and metadone.client.grasyla2.GrasylaContext.getFactory().
Object metadone.client.grasyla2.GrasylaInterpreter.configure | ( | ) | throws BadPreCondition |
Configure the object once all the dependencies have been solved by the Configuration object
BadPreCondition |
Implements metadone.configuration.ConfigElement.
References metadone.client.grasyla2.GrasylaEngineFactory.checkExpression(), metadone.client.grasyla2.GrasylaContext.configure(), metadone.client.grasyla2.GrasylaEngine.context, metadone.metabusiness.Workspace.getBootstrap(), metadone.client.grasyla2.GrasylaEngine.getContext(), metadone.metabusiness.syntax.grasyla.GrasylaScript.getEquations(), metadone.client.grasyla2.GrasylaContext.getFactory(), metadone.client.grasyla2.GrasylaInterpreter.getInitScript(), metadone.client.grasyla2.GrasylaContext.getParentContext(), metadone.client.grasyla2.GrasylaContext.getScript(), metadone.client.grasyla2.GrasylaContext.getScriptEvaluators(), metadone.client.grasyla2.GrasylaContext.getWorkspace(), and metadone.client.grasyla2.GrasylaInterpreter.runInitScript().
Referenced by metadone.client.actions.VisualizeModelAction.actionPerformed(), metadone.client.actions.VisualizeMetaModelAction.actionPerformed(), metadone.client.actions.Test3Action.actionPerformed(), metadone.client.actions.Test4Action.configureGrasyla(), and metadone.client.grasyla2.GrasylaInterpreter.refresh().
final Set<String> metadone.client.grasyla2.GrasylaInterpreter.getFeatures | ( | ) |
Returns the features supported by this interpreter.
Implements metadone.client.display.EngineInterpreter.
References metadone.client.grasyla2.GrasylaEngine.getContext(), metadone.client.grasyla2.GrasylaContext.getFactory(), and metadone.client.grasyla2.GrasylaEngineFactory.getFeatures().
static void metadone.client.grasyla2.GrasylaInterpreter.getInitScript | ( | GrasylaScript | script, |
ProgLanguage | lang, | ||
StringBuilder | s, | ||
Set< GrasylaScript > | done | ||
) | [static, private] |
static String metadone.client.grasyla2.GrasylaInterpreter.getInitScript | ( | GrasylaScript | script, |
ProgLanguage | lang | ||
) | [static, private] |
void metadone.client.grasyla2.GrasylaInterpreter.notifyChildChanged | ( | Engine | child, |
ChildComponent | comp | ||
) | [protected] |
void metadone.client.grasyla2.GrasylaInterpreter.refresh | ( | ) |
Refreshes this interpreter.
This consists of rebuilding the display.
Implements metadone.client.display.EngineInterpreter.
References metadone.client.grasyla2.GrasylaInterpreter.configure(), metadone.client.grasyla2.GrasylaInterpreter.logger, and metadone.client.grasyla2.GrasylaEngine.updateComponent().
Referenced by metadone.client.grasyla2.GrasylaInterpreter.GrasylaInterpreter().
ScriptResult metadone.client.grasyla2.GrasylaInterpreter.runInitScript | ( | ScriptEvaluator | eval, |
String | script | ||
) | [private] |
Evaluates the script and preserves the environment in the GrasylaInterpreter's
given script interpreter.
script | The script to evaluate |
script
was null. References metadone.metabusiness.script.ScriptEvaluator.evaluate(), metadone.client.grasyla2.GrasylaEngine.getContext(), metadone.metabusiness.script.ScriptEvaluator.ScriptResult.getException(), metadone.metabusiness.script.ScriptEvaluator.initScriptEvaluate(), metadone.client.grasyla2.GrasylaContext.initScriptEvaluator(), metadone.metabusiness.script.ScriptEvaluator.ScriptResult.isException(), and metadone.client.grasyla2.GrasylaInterpreter.logger.
Referenced by metadone.client.grasyla2.GrasylaInterpreter.configure().
final Logger metadone.client.grasyla2.GrasylaInterpreter.logger = Logger.getLogger(GrasylaInterpreter.class) [static, private] |
The logger
Reimplemented from metadone.client.grasyla2.GrasylaEngine.
Referenced by metadone.client.grasyla2.GrasylaInterpreter.refresh(), and metadone.client.grasyla2.GrasylaInterpreter.runInitScript().