|
Eclipse Platform Release 3.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.core.expressions.EvaluationContext
public class EvaluationContext
A default implementation of an evaluation context.
Clients may instantiate this default context. The class is not intended to be subclassed by clients.
| Field Summary |
|---|
| Fields inherited from interface org.eclipse.core.expressions.IEvaluationContext |
|---|
UNDEFINED_VARIABLE |
| Constructor Summary | |
|---|---|
EvaluationContext(IEvaluationContext parent,
java.lang.Object defaultVariable)
Create a new evaluation context with the given parent and default variable. |
|
EvaluationContext(IEvaluationContext parent,
java.lang.Object defaultVariable,
IVariableResolver[] resolvers)
Create a new evaluation context with the given parent and default variable. |
|
| Method Summary | |
|---|---|
void |
addVariable(java.lang.String name,
java.lang.Object value)
Adds a new named variable to this context. |
boolean |
getAllowPluginActivation()
Returns whether this evaluation context supports plug-in activation. |
java.lang.Object |
getDefaultVariable()
Returns the default variable. |
IEvaluationContext |
getParent()
Returns the parent context or null if
this is the root of the evaluation context hierarchy. |
IEvaluationContext |
getRoot()
Returns the root evaluation context. |
java.lang.Object |
getVariable(java.lang.String name)
Returns the variable managed under the given name. |
java.lang.Object |
removeVariable(java.lang.String name)
Removes the variable managed under the given name from this evaluation context. |
java.lang.Object |
resolveVariable(java.lang.String name,
java.lang.Object[] args)
Resolves a variable for the given name and arguments. |
void |
setAllowPluginActivation(boolean value)
Specifies whether this evaluation context allows activation of plug-ins for testers used in the expression tree. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EvaluationContext(IEvaluationContext parent,
java.lang.Object defaultVariable)
parent - the parent context. Can be null.defaultVariable - the default variable
public EvaluationContext(IEvaluationContext parent,
java.lang.Object defaultVariable,
IVariableResolver[] resolvers)
parent - the parent context. Can be null.defaultVariable - the default variableresolvers - an array of IVariableResolvers to
resolve additional variables.resolveVariable(String, Object[])| Method Detail |
|---|
public IEvaluationContext getParent()
null if
this is the root of the evaluation context hierarchy.
getParent in interface IEvaluationContextnullpublic IEvaluationContext getRoot()
getRoot in interface IEvaluationContextpublic java.lang.Object getDefaultVariable()
getDefaultVariable in interface IEvaluationContextnull if
no default variable is managed.public void setAllowPluginActivation(boolean value)
true and the actual test expression must have the
attribute forcePluginActivation set to
true as well.
setAllowPluginActivation in interface IEvaluationContextvalue - whether this evaluation context allows plug-in activationpublic boolean getAllowPluginActivation()
IEvaluationContext.setAllowPluginActivation(boolean)
the parent value is returned. If no parent is set false
is returned.
getAllowPluginActivation in interface IEvaluationContext
public void addVariable(java.lang.String name,
java.lang.Object value)
addVariable in interface IEvaluationContextname - the variable's namevalue - the variable's valuepublic java.lang.Object removeVariable(java.lang.String name)
removeVariable in interface IEvaluationContextname - the variable's name
null if
the variable doesn't existpublic java.lang.Object getVariable(java.lang.String name)
getVariable in interface IEvaluationContextname - the variable's name
null if the content
doesn't manage a variable with the given name
public java.lang.Object resolveVariable(java.lang.String name,
java.lang.Object[] args)
throws CoreException
resolve expression.
resolveVariable in interface IEvaluationContextname - the variable to resolveargs - an object array of arguments used to resolve the
variable
null if no variable
can be resolved for the given name and arguments
CoreException - if an errors occurs while resolving
the variable
|
Eclipse Platform Release 3.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2010. All rights reserved.