public final class ActiveShellExpression extends Expression
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.
| Modifier and Type | Field and Description |
|---|---|
static int |
SOURCES
The sources value to use with this expression.
|
ATT_VALUE, FALSE, HASH_CODE_NOT_COMPUTED, HASH_FACTOR, TRUE| Constructor and Description |
|---|
ActiveShellExpression(Shell activeShell)
Constructs a new instance of
ActiveShellExpression |
| Modifier and Type | Method and Description |
|---|---|
void |
collectExpressionInfo(ExpressionInfo info)
Expression information for this expression.
|
protected int |
computeHashCode()
Method to compute the hash code for this object.
|
boolean |
equals(Object object) |
EvaluationResult |
evaluate(IEvaluationContext context)
Evaluates this expression.
|
String |
toString() |
computeExpressionInfo, equals, equals, hashCode, hashCode, hashCodepublic static final int SOURCES
public ActiveShellExpression(Shell activeShell)
ActiveShellExpressionactiveShell - The shell to match with the active shell; null
if it will match any active shell.public final void collectExpressionInfo(ExpressionInfo info)
collectExpressionInfo in class Expressioninfo - the expression information object used
to collect the informationprotected final int computeHashCode()
ExpressionfHashCode
field. If the value returned from the method equals Expression.HASH_CODE_NOT_COMPUTED
(e.g. -1) then the value is incremented by one.
This default implementation calls super.hashCode()
computeHashCode in class Expressionpublic final EvaluationResult evaluate(IEvaluationContext context)
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.evaluate in class Expressioncontext - The context from which the current state is determined; must
not be null.EvaluationResult.TRUE if the shell is active;
EvaluationResult.FALSE otherwise.Guidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.