final public class ActiveShellExpression extends Expression (Code)
An expression that checks the active shell variable. The variable name is
ISources.ACTIVE_SHELL_NAME and falls back to
ISources.ACTIVE_WORKBENCH_WINDOW. That is, if the active
shell doesn't match, then it will be allowed to match the active workbench
window.
since: 3.1
Field Summary
final public static int
SOURCES The sources value to use with this expression.
public ActiveShellExpression(Shell activeShell)(Code)
Constructs a new instance of ActiveShellExpression Parameters: activeShell - The shell to match with the active shell; nullif it will match any active shell.
Method Detail
collectExpressionInfo
final public void collectExpressionInfo(ExpressionInfo info)(Code)
Expression information for this expression. Namely active shell and
active workbench window name.
since: 3.2
final public EvaluationResult evaluate(IEvaluationContext context)(Code)
Evaluates this expression. If the active shell defined by the context
matches the shell from this expression, then this evaluates to
EvaluationResult.TRUE. Similarly, if the active workbench
window shell defined by the context matches the shell from this
expression, then this evaluates to EvaluationResult.TRUE.
Parameters: context - The context from which the current state is determined; mustnot be null. EvaluationResult.TRUE if the shell is active;EvaluationResult.FALSE otherwise.