MetaDone
|
Public Member Functions | |
GrasylaContext (GrasylaContext parent) | |
GrasylaContext (ConcreteObjectGroup cog, GrasylaContext parent) | |
GrasylaEquation | getEquation () |
final ConcreteObjectGroup | getObject () |
boolean | setObject (ConcreteObjectGroup cog, boolean ordered) |
final GrasylaContext | getParentContext () |
String | getFunctor () |
void | setFunctor (String functor) |
Object | getVariable (String name) |
boolean | setVariable (String name, Object value) |
VariableContext | getVariableContext (String name) |
EventTower< Object > | getVariableEvents () |
EventTower< Object > | getContextEvents () |
ScriptEvaluator | getScriptEvaluator (ProgLanguage lang) |
Set< ScriptEvaluator > | getScriptEvaluators () |
final void | initScriptEvaluator (ScriptEvaluator eval) |
GrasylaEngineFactory | getFactory () |
Workspace | getWorkspace () |
GrasylaScript | getScript () |
final View | getView () |
final GrasylaEngine | getOwner () |
void | setOwner (GrasylaEngine engine, boolean createView) throws BadPreCondition |
MetaModel | getMetaModel () |
ConcreteModel | getModel () |
SelectorBestEquation | getSelector () |
Object | configure () throws BadPreCondition |
void | activate () |
void | deactivate () |
Protected Member Functions | |
String | getFunctorFromParent () |
boolean | declareVariable (String name, Object value, VariableStoreType type) |
void | initScriptEvaluatorGlobal (ScriptEvaluator eval) |
final boolean | ownsView () |
void | setView (View view) |
Static Protected Attributes | |
static final Logger | logger = Logger.getLogger(GrasylaContext.class) |
Private Member Functions | |
ConcreteObject | getObjectSingle () |
Static Private Member Functions | |
static Object | getPhenomenonValue (Phenomenon ph, String name) throws BadPreCondition |
static void | setPhenomenonValue (Phenomenon ph, String name, Object value) throws BadPreCondition |
static Set< ConcreteObject > | convertToPhenomenonConcreteObjects (Object value) |
Private Attributes | |
final GrasylaContext | parent |
final HashMap< String, Object > | variables = new HashMap<String, Object>() |
final EventTower< Object > | event = new EventTowerNormal<Object>() |
String | functor |
ConcreteObjectGroup | cog |
View | view |
GrasylaEngine | owner |
transient Subscriber < EventValueChange > | valueChanged = null |
Static Private Attributes | |
static final Object | STORED = new Object() |
static final Object | STORED_GLOBAL = new Object() |
static final String | CONTEXT_VAR = "GrasylaContextVar:" |
Grasyla context.
metadone.client.grasyla2.GrasylaContext.GrasylaContext | ( | GrasylaContext | parent | ) |
Initializes this context.
parent | The parent context |
References metadone.client.grasyla2.GrasylaContext.getObject(), and metadone.client.grasyla2.GrasylaContext.parent.
metadone.client.grasyla2.GrasylaContext.GrasylaContext | ( | ConcreteObjectGroup | cog, |
GrasylaContext | parent | ||
) |
Initializes this context
cog | The concrete object group |
parent | The parent context or null |
References metadone.client.grasyla2.GrasylaContext.cog, and metadone.client.grasyla2.GrasylaContext.parent.
void metadone.client.grasyla2.GrasylaContext.activate | ( | ) |
Activates this context.
References metadone.client.grasyla2.GrasylaContext.CONTEXT_VAR, metadone.util.MapFcts.equal(), metadone.metabusiness.syntax.Phenomenon.getAttributeCOValue(), metadone.metabusiness.syntax.View.getElement(), metadone.metabusiness.Workspace.getEventManager(), metadone.client.grasyla2.GrasylaEngine.getExpression(), metadone.metabusiness.syntax.grasyla.GrasylaView.getGlobalView(), metadone.metabusiness.events.EventValueChange.getObject(), metadone.client.grasyla2.GrasylaContext.getObjectSingle(), metadone.util.ListUtil.getOneOf(), metadone.metabusiness.ConcreteObject.getOnePropertyValue(), metadone.client.grasyla2.GrasylaContext.getView(), metadone.client.grasyla2.GrasylaContext.getWorkspace(), metadone.client.grasyla2.GrasylaContext.logger, metadone.client.grasyla2.GrasylaContext.owner, metadone.client.grasyla2.GrasylaContext.STORED, metadone.client.grasyla2.GrasylaContext.STORED_GLOBAL, metadone.metabusiness.events.MetadoneEvents.subscribe(), metadone.client.grasyla2.GrasylaContext.valueChanged, metadone.client.grasyla2.GrasylaContext.variables, and metadone.client.grasyla2.GrasylaContext.view.
Referenced by metadone.client.grasyla2.GrasylaEngine.activate().
Object metadone.client.grasyla2.GrasylaContext.configure | ( | ) | throws BadPreCondition |
Configure the object once all the dependencies have been solved by the Configuration object
BadPreCondition |
Implements metadone.configuration.ConfigElement.
Reimplemented in metadone.client.grasyla2.GrasylaRootContext.
References metadone.client.grasyla2.GrasylaContext.getEquation(), metadone.client.grasyla2.GrasylaContext.getMetaModel(), and metadone.client.grasyla2.GrasylaContext.getModel().
Referenced by metadone.client.grasyla2.GrasylaInterpreter.configure(), and metadone.client.grasyla2.GrasylaEngine.updateContext().
static Set<ConcreteObject> metadone.client.grasyla2.GrasylaContext.convertToPhenomenonConcreteObjects | ( | Object | value | ) | [static, private] |
Referenced by metadone.client.grasyla2.GrasylaContext.setPhenomenonValue().
void metadone.client.grasyla2.GrasylaContext.deactivate | ( | ) |
Deactivates this context.
References metadone.client.grasyla2.GrasylaContext.CONTEXT_VAR, metadone.util.MapFcts.equal(), metadone.metabusiness.syntax.Phenomenon.getAttributeCOValue(), metadone.metabusiness.syntax.View.getElement(), metadone.metabusiness.Workspace.getEventManager(), metadone.client.grasyla2.GrasylaEngine.getExpression(), metadone.metabusiness.syntax.grasyla.GrasylaView.getGlobalView(), metadone.metabusiness.events.EventValueChange.getObject(), metadone.client.grasyla2.GrasylaContext.getObjectSingle(), metadone.client.grasyla2.GrasylaContext.getView(), metadone.client.grasyla2.GrasylaContext.getWorkspace(), metadone.client.grasyla2.GrasylaContext.logger, metadone.client.grasyla2.GrasylaContext.owner, metadone.client.grasyla2.GrasylaContext.STORED, metadone.client.grasyla2.GrasylaContext.STORED_GLOBAL, metadone.metabusiness.events.MetadoneEvents.unsubscribe(), metadone.client.grasyla2.GrasylaContext.valueChanged, metadone.client.grasyla2.GrasylaContext.variables, and metadone.client.grasyla2.GrasylaContext.view.
Referenced by metadone.client.grasyla2.GrasylaEngine.deactivate().
boolean metadone.client.grasyla2.GrasylaContext.declareVariable | ( | String | name, |
Object | value, | ||
VariableStoreType | type | ||
) | [protected] |
Declares a new variable.
name | The name of the variable |
value | The value |
type | The type of the storage |
true
if the variable was set References metadone.client.grasyla2.GrasylaContext.CONTEXT_VAR, metadone.metabusiness.syntax.Phenomenon.getAttributeCOValue(), metadone.client.grasyla2.GrasylaEngine.getExpression(), metadone.metabusiness.syntax.grasyla.GrasylaView.getGlobalView(), metadone.client.grasyla2.GrasylaContext.getObjectSingle(), metadone.client.grasyla2.GrasylaContext.getView(), metadone.client.grasyla2.GrasylaContext.owner, metadone.client.grasyla2.GrasylaContext.ownsView(), metadone.metabusiness.syntax.View.produceElement(), metadone.client.grasyla2.GrasylaContext.setPhenomenonValue(), metadone.client.grasyla2.GrasylaContext.STORED, metadone.client.grasyla2.GrasylaContext.STORED_GLOBAL, metadone.client.grasyla2.GrasylaContext.variables, and metadone.client.grasyla2.GrasylaContext.view.
Referenced by metadone.client.grasyla2.GrasylaEngine.updateContext().
EventTower<Object> metadone.client.grasyla2.GrasylaContext.getContextEvents | ( | ) |
Gets the event tower for this context events.
References metadone.client.grasyla2.GrasylaContext.event.
Referenced by metadone.client.grasyla2.GrasylaContext.getVariableEvents().
GrasylaEquation metadone.client.grasyla2.GrasylaContext.getEquation | ( | ) |
Gets the interpreted equation.
Reimplemented in metadone.client.grasyla2.GrasylaContextEquation.
References metadone.client.grasyla2.GrasylaContext.getEquation(), and metadone.client.grasyla2.GrasylaContext.getParentContext().
Referenced by metadone.client.grasyla2.value.GrasylaEngineAdaptorFromValue< T >.adapt(), metadone.client.grasyla2.GrasylaEngine.buildChild(), metadone.client.grasyla2.GrasylaContext.configure(), metadone.client.grasyla2.GrasylaEngine.debugEngineTreeGraphViz_nodeContents(), metadone.client.grasyla2.ref.ActionDeleteEngine.delete_property(), metadone.client.grasyla2.GrasylaEngineFactory.equivalentContext(), metadone.client.grasyla2.GrasylaContext.getEquation(), metadone.client.grasyla2.ref.RefEngine.getFunctorChange(), metadone.client.grasyla2.ref.RefObjectEngine.getProperty(), and metadone.client.grasyla2.GrasylaInterpreter.GrasylaInterpreter().
GrasylaEngineFactory metadone.client.grasyla2.GrasylaContext.getFactory | ( | ) |
Gets the factory of engines.
Implements metadone.client.display.Context.
Reimplemented in metadone.client.grasyla2.GrasylaRootContext.
References metadone.client.grasyla2.GrasylaContext.getFactory(), and metadone.client.grasyla2.GrasylaContext.getParentContext().
Referenced by metadone.client.grasyla2.value.GrasylaEngineAdaptorFromValue< T >.adapt(), metadone.client.grasyla2.GrasylaEngine.buildChild(), metadone.client.grasyla2.GrasylaEngine.buildComponent(), metadone.client.grasyla2.GrasylaInterpreter.buildNewComponent(), metadone.client.grasyla2.GrasylaInterpreter.configure(), metadone.client.grasyla2.visuallibrary.VLImageSVGEngine.evaluateComponent(), metadone.client.grasyla2.GrasylaContext.getFactory(), metadone.client.grasyla2.GrasylaInterpreter.getFeatures(), metadone.client.grasyla2.GrasylaEngine.refresh(), and metadone.client.grasyla2.generic.ReduceEngine.updateComponent().
String metadone.client.grasyla2.GrasylaContext.getFunctor | ( | ) |
Gets the functor.
References metadone.client.grasyla2.GrasylaContext.functor, and metadone.client.grasyla2.GrasylaContext.getFunctorFromParent().
Referenced by metadone.client.grasyla2.GrasylaEngineFactory.equivalentContext(), metadone.client.grasyla2.GrasylaContextEquation.findEquation(), metadone.client.grasyla2.GrasylaContextEquation.getEquation(), metadone.client.grasyla2.ref.RefEngine.getFunctorChange(), and metadone.client.grasyla2.GrasylaContext.getFunctorFromParent().
String metadone.client.grasyla2.GrasylaContext.getFunctorFromParent | ( | ) | [protected] |
Gets the functor from the parent context.
Reimplemented in metadone.client.grasyla2.GrasylaContextEquation.
References metadone.client.grasyla2.GrasylaContext.getFunctor(), and metadone.client.grasyla2.GrasylaContext.getParentContext().
Referenced by metadone.client.grasyla2.GrasylaContext.getFunctor().
MetaModel metadone.client.grasyla2.GrasylaContext.getMetaModel | ( | ) |
Gets the current metamodel.
Implements metadone.client.display.Context.
Reimplemented in metadone.client.grasyla2.GrasylaContextEquation, and metadone.client.grasyla2.GrasylaRootContext.
References metadone.client.grasyla2.GrasylaContext.getMetaModel(), and metadone.client.grasyla2.GrasylaContext.getParentContext().
Referenced by metadone.client.grasyla2.ref.MetaEngine.buildNewComponent(), metadone.client.grasyla2.GrasylaContext.configure(), metadone.client.grasyla2.ref.ActionDeleteEngine.delete_property(), metadone.client.grasyla2.GrasylaContext.getMetaModel(), metadone.client.grasyla2.ref.RefObjectEngine.getProperty(), metadone.client.grasyla2.GrasylaContext.getWorkspace(), and metadone.client.grasyla2.GrasylaContext.initScriptEvaluator().
ConcreteModel metadone.client.grasyla2.GrasylaContext.getModel | ( | ) |
Gets the current model.
Implements metadone.client.display.Context.
Reimplemented in metadone.client.grasyla2.GrasylaRootContext.
References metadone.client.grasyla2.GrasylaContext.getModel(), and metadone.client.grasyla2.GrasylaContext.getParentContext().
Referenced by metadone.client.grasyla2.GrasylaContext.configure(), metadone.client.grasyla2.visuallibrary.GrasylaScene.MyConnectProvider.createConnection(), metadone.client.grasyla2.GrasylaContext.getModel(), and metadone.client.grasyla2.GrasylaContext.initScriptEvaluator().
final ConcreteObjectGroup metadone.client.grasyla2.GrasylaContext.getObject | ( | ) |
Gets the represented object group.
Implements metadone.client.display.Context.
References metadone.client.grasyla2.GrasylaContext.cog.
Referenced by metadone.client.grasyla2.ref.MetaEngine.buildNewComponent(), metadone.client.grasyla2.generic.TailEngine.buildNewComponent(), metadone.client.grasyla2.generic.HeadEngine.buildNewComponent(), metadone.client.grasyla2.visuallibrary.GrasylaScene.MyConnectProvider.createConnection(), metadone.client.grasyla2.ref.ActionDeleteEngine.delete_property(), metadone.client.grasyla2.GrasylaEngineFactory.equivalentContext(), metadone.client.grasyla2.GrasylaContextEquation.findEquation(), metadone.client.grasyla2.visuallibrary.GrasylaScene.getCOForMovable(), metadone.client.grasyla2.GrasylaContextEquation.getEquation(), metadone.client.grasyla2.GrasylaContext.getObjectSingle(), metadone.client.grasyla2.ref.RefObjectEngine.getProperty(), metadone.client.grasyla2.ref.SideEngine.getRole(), metadone.client.grasyla2.ref.RefEngine.getSelf(), metadone.client.grasyla2.GrasylaContext.GrasylaContext(), metadone.client.grasyla2.GrasylaContext.initScriptEvaluator(), metadone.client.grasyla2.visuallibrary.GrasylaScene.MyConnectProvider.isSourceWidget(), metadone.client.grasyla2.visuallibrary.GrasylaScene.MyConnectProvider.isTargetWidget(), metadone.client.grasyla2.GrasylaContext.setObject(), and metadone.client.grasyla2.GrasylaContext.setOwner().
ConcreteObject metadone.client.grasyla2.GrasylaContext.getObjectSingle | ( | ) | [private] |
References metadone.client.grasyla2.GrasylaContext.cog, metadone.client.display.ConcreteObjectGroup.getHead(), metadone.client.grasyla2.GrasylaContext.getObject(), and metadone.client.display.ConcreteObjectGroup.isEmpty().
Referenced by metadone.client.grasyla2.GrasylaContext.activate(), metadone.client.grasyla2.GrasylaContext.deactivate(), metadone.client.grasyla2.GrasylaContext.declareVariable(), metadone.client.grasyla2.GrasylaContext.getVariable(), and metadone.client.grasyla2.GrasylaContext.setVariable().
final GrasylaEngine metadone.client.grasyla2.GrasylaContext.getOwner | ( | ) |
Gets the owner engine.
null
References metadone.client.grasyla2.GrasylaContext.owner.
Referenced by metadone.client.grasyla2.visuallibrary.AnchorEngine.AnchorBuilder.buildList(), and metadone.client.grasyla2.visuallibrary.AnchorEngine.registerAttributeHandlers().
final GrasylaContext metadone.client.grasyla2.GrasylaContext.getParentContext | ( | ) |
Gets the parent context.
null
References metadone.client.grasyla2.GrasylaContext.parent.
Referenced by metadone.client.grasyla2.GrasylaInterpreter.configure(), metadone.client.grasyla2.GrasylaContext.getEquation(), metadone.client.grasyla2.GrasylaContext.getFactory(), metadone.client.grasyla2.GrasylaContext.getFunctorFromParent(), metadone.client.grasyla2.GrasylaContext.getMetaModel(), metadone.client.grasyla2.GrasylaContext.getModel(), metadone.client.grasyla2.visuallibrary.GraphEngine.getScene(), metadone.client.grasyla2.GrasylaContext.getScriptEvaluator(), metadone.client.grasyla2.GrasylaContext.getScriptEvaluators(), metadone.client.grasyla2.GrasylaContext.getSelector(), metadone.client.grasyla2.GrasylaContext.getVariable(), metadone.client.grasyla2.GrasylaContext.getVariableContext(), metadone.client.grasyla2.GrasylaContext.getView(), metadone.client.grasyla2.GrasylaContext.initScriptEvaluatorGlobal(), metadone.client.grasyla2.GrasylaEngineFactory.loopDetectInContext(), metadone.client.grasyla2.GrasylaContext.setOwner(), and metadone.client.grasyla2.GrasylaContext.setVariable().
static Object metadone.client.grasyla2.GrasylaContext.getPhenomenonValue | ( | Phenomenon | ph, |
String | name | ||
) | throws BadPreCondition [static, private] |
References metadone.util.ClassUtil.convert().
Referenced by metadone.client.grasyla2.GrasylaContext.getVariable().
GrasylaScript metadone.client.grasyla2.GrasylaContext.getScript | ( | ) |
Gets the script linked to the view.
Implements metadone.client.display.Context.
References metadone.metabusiness.syntax.View.getScript(), and metadone.client.grasyla2.GrasylaContext.getView().
Referenced by metadone.client.grasyla2.visuallibrary.GrasylaScene.configure(), metadone.client.grasyla2.GrasylaInterpreter.configure(), and metadone.client.grasyla2.GrasylaRootContext.GrasylaRootContext().
ScriptEvaluator metadone.client.grasyla2.GrasylaContext.getScriptEvaluator | ( | ProgLanguage | lang | ) |
Gets the script evaluator for some language.
lang | The language |
NoSuchElementException | when there is no script evaluator for that language |
Implements metadone.client.display.Context.
Reimplemented in metadone.client.grasyla2.GrasylaRootContext.
References metadone.client.grasyla2.GrasylaContext.getParentContext(), metadone.client.grasyla2.GrasylaContext.getScriptEvaluator(), and metadone.client.grasyla2.GrasylaContext.parent.
Referenced by metadone.client.grasyla2.GrasylaContext.getScriptEvaluator().
Set<ScriptEvaluator> metadone.client.grasyla2.GrasylaContext.getScriptEvaluators | ( | ) |
Gets all the script evaluators.
Implements metadone.client.display.Context.
Reimplemented in metadone.client.grasyla2.GrasylaRootContext.
References metadone.client.grasyla2.GrasylaContext.getParentContext(), and metadone.client.grasyla2.GrasylaContext.getScriptEvaluators().
Referenced by metadone.client.grasyla2.GrasylaInterpreter.configure(), and metadone.client.grasyla2.GrasylaContext.getScriptEvaluators().
SelectorBestEquation metadone.client.grasyla2.GrasylaContext.getSelector | ( | ) |
Gets the equation selector.
Reimplemented in metadone.client.grasyla2.GrasylaRootContext.
References metadone.client.grasyla2.GrasylaContext.getParentContext(), and metadone.client.grasyla2.GrasylaContext.getSelector().
Referenced by metadone.client.grasyla2.GrasylaContextEquation.findEquation(), and metadone.client.grasyla2.GrasylaContext.getSelector().
Object metadone.client.grasyla2.GrasylaContext.getVariable | ( | String | name | ) |
Gets the value of a variable.
name | The name of the variable |
null
Implements metadone.metabusiness.script.VariableContext.
Reimplemented in metadone.client.grasyla2.actions.GrasylaActionEngine.ActionContext.
References metadone.client.grasyla2.GrasylaContext.CONTEXT_VAR, metadone.metabusiness.syntax.View.getElement(), metadone.client.grasyla2.GrasylaEngine.getExpression(), metadone.metabusiness.syntax.grasyla.GrasylaView.getGlobalView(), metadone.client.grasyla2.GrasylaContext.getObjectSingle(), metadone.client.grasyla2.GrasylaContext.getParentContext(), metadone.client.grasyla2.GrasylaContext.getPhenomenonValue(), metadone.client.grasyla2.GrasylaContext.getVariable(), metadone.client.grasyla2.GrasylaContext.getView(), metadone.client.grasyla2.GrasylaContext.owner, metadone.client.grasyla2.GrasylaContext.parent, metadone.client.grasyla2.GrasylaContext.STORED, metadone.client.grasyla2.GrasylaContext.STORED_GLOBAL, metadone.client.grasyla2.GrasylaContext.variables, and metadone.client.grasyla2.GrasylaContext.view.
Referenced by metadone.client.grasyla2.GrasylaContext.getVariable().
VariableContext metadone.client.grasyla2.GrasylaContext.getVariableContext | ( | String | name | ) |
Gets the variable context where the variable is defined.
The context is this it the variable is defined in this context, otherwise the call may be delegated or null
can be returned.
name | The name of the variable |
null
Implements metadone.metabusiness.script.VariableContext.
Reimplemented in metadone.client.grasyla2.actions.GrasylaActionEngine.ActionContext.
References metadone.client.grasyla2.GrasylaContext.getParentContext(), metadone.client.grasyla2.GrasylaContext.getVariableContext(), metadone.client.grasyla2.GrasylaContext.parent, and metadone.client.grasyla2.GrasylaContext.variables.
Referenced by metadone.client.grasyla2.GrasylaContext.getVariableContext().
EventTower<Object> metadone.client.grasyla2.GrasylaContext.getVariableEvents | ( | ) |
Gets the event manager for variables.
Implements metadone.metabusiness.script.VariableContext.
References metadone.client.grasyla2.GrasylaContext.getContextEvents().
final View metadone.client.grasyla2.GrasylaContext.getView | ( | ) |
Gets the view.
Implements metadone.client.display.Context.
References metadone.client.grasyla2.GrasylaContext.getParentContext(), metadone.client.grasyla2.GrasylaContext.getView(), and metadone.client.grasyla2.GrasylaContext.view.
Referenced by metadone.client.grasyla2.GrasylaContext.activate(), metadone.client.grasyla2.GrasylaContext.deactivate(), metadone.client.grasyla2.GrasylaContext.declareVariable(), metadone.client.grasyla2.visuallibrary.GrasylaScene.getPhenomenon(), metadone.client.grasyla2.GrasylaContext.getScript(), metadone.client.grasyla2.GrasylaContext.getVariable(), metadone.client.grasyla2.GrasylaContext.getView(), metadone.client.grasyla2.GrasylaInterpreter.GrasylaInterpreter(), metadone.client.grasyla2.GrasylaContext.setOwner(), and metadone.client.grasyla2.GrasylaContext.setVariable().
Workspace metadone.client.grasyla2.GrasylaContext.getWorkspace | ( | ) |
Gets the workspace.
Implements metadone.client.display.Context.
References metadone.client.grasyla2.GrasylaContext.getMetaModel(), and metadone.metabusiness.WorkspaceObject.getWorkspace().
Referenced by metadone.client.grasyla2.GrasylaContext.activate(), metadone.client.grasyla2.GrasylaInterpreter.configure(), metadone.client.grasyla2.GrasylaContext.deactivate(), metadone.client.grasyla2.GrasylaContext.initScriptEvaluator(), and metadone.client.grasyla2.GrasylaEngine.trigger().
final void metadone.client.grasyla2.GrasylaContext.initScriptEvaluator | ( | ScriptEvaluator | eval | ) |
Updates the variables used by the script evaluator.
Defines variables:
this
eval | The script evaluator |
References metadone.metabusiness.script.ScriptEvaluator.clearVariables(), metadone.metabusiness.script.ScriptEvaluator.declareVariable(), metadone.client.grasyla2.GrasylaContext.getMetaModel(), metadone.client.grasyla2.GrasylaContext.getModel(), metadone.client.grasyla2.GrasylaContext.getObject(), metadone.client.grasyla2.GrasylaContext.getWorkspace(), and metadone.client.grasyla2.GrasylaContext.initScriptEvaluatorGlobal().
Referenced by metadone.client.grasyla2.GrasylaInterpreter.runInitScript().
void metadone.client.grasyla2.GrasylaContext.initScriptEvaluatorGlobal | ( | ScriptEvaluator | eval | ) | [protected] |
Initializes the variables of the script evaluator
eval | The script evaluator |
Reimplemented in metadone.client.grasyla2.actions.GrasylaActionEngine.ActionContext, and metadone.client.grasyla2.visuallibrary.GraphEngine.GrasylaContextGraph.
References metadone.client.grasyla2.GrasylaContext.getParentContext(), metadone.client.grasyla2.GrasylaContext.initScriptEvaluatorGlobal(), and metadone.client.grasyla2.GrasylaContext.parent.
Referenced by metadone.client.grasyla2.GrasylaContext.initScriptEvaluator(), and metadone.client.grasyla2.GrasylaContext.initScriptEvaluatorGlobal().
final boolean metadone.client.grasyla2.GrasylaContext.ownsView | ( | ) | [protected] |
Checks whether this context is owned by an engine.
true
iff a view is set References metadone.client.grasyla2.GrasylaContext.view.
Referenced by metadone.client.grasyla2.GrasylaContext.declareVariable(), and metadone.client.grasyla2.GrasylaContext.setOwner().
void metadone.client.grasyla2.GrasylaContext.setFunctor | ( | String | functor | ) |
Sets the functor.
functor | The new functor |
Reimplemented in metadone.client.grasyla2.GrasylaRootContext.
References metadone.client.grasyla2.GrasylaContext.functor.
Referenced by metadone.client.grasyla2.GrasylaEngine.updateContext().
boolean metadone.client.grasyla2.GrasylaContext.setObject | ( | ConcreteObjectGroup | cog, |
boolean | ordered | ||
) |
Tries to set the object for this context.
cog | The new concrete object group |
ordered | Whether the order of the elements matter |
true
iff this new cog was set References metadone.client.grasyla2.GrasylaContext.cog, metadone.client.display.ConcreteObjectGroup.getMultiplicity(), metadone.client.grasyla2.GrasylaContext.getObject(), and metadone.client.grasyla2.actions.ConcreteObjectGroupChange.isAccepted().
void metadone.client.grasyla2.GrasylaContext.setOwner | ( | GrasylaEngine | engine, |
boolean | createView | ||
) | throws BadPreCondition |
Sets the owner.
engine | The new owner or null |
createView | Whether to create a view for the engine |
BadPreCondition |
References metadone.metabusiness.syntax.InternalViewElement.getExpression(), metadone.client.display.ConcreteObjectGroup.getHead(), metadone.client.grasyla2.GrasylaContext.getObject(), metadone.client.grasyla2.GrasylaContext.getParentContext(), metadone.client.grasyla2.GrasylaContext.getView(), metadone.client.grasyla2.GrasylaContext.owner, metadone.client.grasyla2.GrasylaContext.ownsView(), metadone.metabusiness.syntax.View.produceElement(), metadone.client.grasyla2.GrasylaContext.setView(), and metadone.client.grasyla2.GrasylaContext.view.
Referenced by metadone.client.grasyla2.visuallibrary.AnchorEngine.registerAttributeHandlers(), metadone.client.grasyla2.visuallibrary.VLFreeEngine.updateContext(), and metadone.client.grasyla2.GrasylaEngine.updateContext().
static void metadone.client.grasyla2.GrasylaContext.setPhenomenonValue | ( | Phenomenon | ph, |
String | name, | ||
Object | value | ||
) | throws BadPreCondition [static, private] |
boolean metadone.client.grasyla2.GrasylaContext.setVariable | ( | String | name, |
Object | value | ||
) |
Sets the value of a variable.
name | The name of the variable |
value | The new value |
true
iff the variable was set Implements metadone.metabusiness.script.VariableContext.
Reimplemented in metadone.client.grasyla2.actions.GrasylaActionEngine.ActionContext.
References metadone.client.grasyla2.GrasylaContext.CONTEXT_VAR, metadone.metabusiness.syntax.View.getElement(), metadone.client.grasyla2.GrasylaEngine.getExpression(), metadone.metabusiness.syntax.grasyla.GrasylaView.getGlobalView(), metadone.client.grasyla2.GrasylaContext.getObjectSingle(), metadone.client.grasyla2.GrasylaContext.getParentContext(), metadone.client.grasyla2.GrasylaContext.getView(), metadone.client.grasyla2.GrasylaContext.owner, metadone.client.grasyla2.GrasylaContext.parent, metadone.client.grasyla2.GrasylaContext.setPhenomenonValue(), metadone.client.grasyla2.GrasylaContext.setVariable(), metadone.client.grasyla2.GrasylaContext.STORED, metadone.client.grasyla2.GrasylaContext.STORED_GLOBAL, metadone.client.grasyla2.GrasylaContext.variables, and metadone.client.grasyla2.GrasylaContext.view.
Referenced by metadone.client.grasyla2.GrasylaContext.setVariable().
void metadone.client.grasyla2.GrasylaContext.setView | ( | View | view | ) | [protected] |
Sets a view for this context.
view | The view or null |
References metadone.client.grasyla2.GrasylaContext.view.
Referenced by metadone.client.grasyla2.GrasylaRootContext.GrasylaRootContext(), and metadone.client.grasyla2.GrasylaContext.setOwner().
Referenced by metadone.client.grasyla2.GrasylaContextEquation.getEquation(), metadone.client.grasyla2.GrasylaContext.getObject(), metadone.client.grasyla2.GrasylaContext.getObjectSingle(), metadone.client.grasyla2.GrasylaContext.GrasylaContext(), metadone.client.grasyla2.GrasylaContextEquation.GrasylaContextEquation(), and metadone.client.grasyla2.GrasylaContext.setObject().
final String metadone.client.grasyla2.GrasylaContext.CONTEXT_VAR = "GrasylaContextVar:" [static, private] |
final EventTower<Object> metadone.client.grasyla2.GrasylaContext.event = new EventTowerNormal<Object>() [private] |
Reimplemented in metadone.client.grasyla2.actions.GrasylaActionEngine.ActionContext.
Referenced by metadone.client.grasyla2.GrasylaContext.getContextEvents().
String metadone.client.grasyla2.GrasylaContext.functor [private] |
final Logger metadone.client.grasyla2.GrasylaContext.logger = Logger.getLogger(GrasylaContext.class) [static, protected] |
Referenced by metadone.client.grasyla2.GrasylaContext.activate(), metadone.client.grasyla2.GrasylaContext.deactivate(), metadone.client.grasyla2.GrasylaContext.declareVariable(), metadone.client.grasyla2.GrasylaContext.getOwner(), metadone.client.grasyla2.GrasylaContext.getVariable(), metadone.client.grasyla2.GrasylaContext.setOwner(), and metadone.client.grasyla2.GrasylaContext.setVariable().
final GrasylaContext metadone.client.grasyla2.GrasylaContext.parent [private] |
Referenced by metadone.client.grasyla2.GrasylaContext.getParentContext(), metadone.client.grasyla2.GrasylaContext.getScriptEvaluator(), metadone.client.grasyla2.GrasylaContext.getVariable(), metadone.client.grasyla2.GrasylaContext.getVariableContext(), metadone.client.grasyla2.GrasylaContext.GrasylaContext(), metadone.client.grasyla2.GrasylaContextEquation.GrasylaContextEquation(), metadone.client.grasyla2.GrasylaContext.initScriptEvaluatorGlobal(), and metadone.client.grasyla2.GrasylaContext.setVariable().
final Object metadone.client.grasyla2.GrasylaContext.STORED = new Object() [static, private] |
final Object metadone.client.grasyla2.GrasylaContext.STORED_GLOBAL = new Object() [static, private] |
transient Subscriber<EventValueChange> metadone.client.grasyla2.GrasylaContext.valueChanged = null [private] |
final HashMap<String, Object> metadone.client.grasyla2.GrasylaContext.variables = new HashMap<String, Object>() [private] |
Referenced by metadone.client.grasyla2.GrasylaContext.activate(), metadone.client.grasyla2.GrasylaContext.deactivate(), metadone.client.grasyla2.GrasylaContext.declareVariable(), metadone.client.grasyla2.GrasylaContext.getVariable(), metadone.client.grasyla2.GrasylaContext.getVariableContext(), and metadone.client.grasyla2.GrasylaContext.setVariable().
Referenced by metadone.client.grasyla2.GrasylaContext.activate(), metadone.client.grasyla2.GrasylaContext.deactivate(), metadone.client.grasyla2.GrasylaContext.declareVariable(), metadone.client.grasyla2.GrasylaContext.getVariable(), metadone.client.grasyla2.GrasylaContext.getView(), metadone.client.grasyla2.GrasylaContext.ownsView(), metadone.client.grasyla2.GrasylaContext.setOwner(), metadone.client.grasyla2.GrasylaContext.setVariable(), and metadone.client.grasyla2.GrasylaContext.setView().