Package org.eclipse.ui
Class ActiveShellExpression
java.lang.Object
org.eclipse.core.expressions.Expression
org.eclipse.ui.ActiveShellExpression
 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 SummaryFieldsModifier and TypeFieldDescriptionstatic final intThe sources value to use with this expression.Fields inherited from class org.eclipse.core.expressions.ExpressionATT_VALUE, FALSE, HASH_CODE_NOT_COMPUTED, HASH_FACTOR, TRUE
- 
Constructor SummaryConstructorsConstructorDescriptionActiveShellExpression(Shell activeShell) Constructs a new instance ofActiveShellExpression
- 
Method SummaryModifier and TypeMethodDescriptionvoidExpression information for this expression.protected intMethod to compute the hash code for this object.booleanevaluate(IEvaluationContext context) Evaluates this expression.toString()Methods inherited from class org.eclipse.core.expressions.ExpressioncomputeExpressionInfo, equals, equals, hashCode, hashCode, hashCode
- 
Field Details- 
SOURCESpublic static final int SOURCESThe sources value to use with this expression.- See Also:
 
 
- 
- 
Constructor Details- 
ActiveShellExpressionConstructs a new instance ofActiveShellExpression- Parameters:
- activeShell- The shell to match with the active shell;- nullif it will match any active shell.
 
 
- 
- 
Method Details- 
collectExpressionInfoExpression information for this expression. Namely active shell and active workbench window name.- Overrides:
- collectExpressionInfoin class- Expression
- Parameters:
- info- the expression information object used to collect the information
- Since:
- 3.2
 
- 
computeHashCodeprotected int computeHashCode()Description copied from class:ExpressionMethod to compute the hash code for this object. The result returned from this method in cached in thefHashCodefield. If the value returned from the method equalsExpression.HASH_CODE_NOT_COMPUTED(e.g.-1) then the value is incremented by one.This default implementation calls super.hashCode()- Overrides:
- computeHashCodein class- Expression
- Returns:
- a hash code for this object.
 
- 
equals
- 
evaluateEvaluates this expression. If the active shell defined by the context matches the shell from this expression, then this evaluates toEvaluationResult.TRUE. Similarly, if the active workbench window shell defined by the context matches the shell from this expression, then this evaluates toEvaluationResult.TRUE.- Specified by:
- evaluatein class- Expression
- Parameters:
- context- The context from which the current state is determined; must not be- null.
- Returns:
- EvaluationResult.TRUEif the shell is active;- EvaluationResult.FALSEotherwise.
 
- 
toString
 
-