hashCode() Computes the hash code for this object based on the id.
public boolean
isEnabledFor(IStructuredSelection selection) Returns whether the expression is valid for all elements of the given
selection.
public boolean
isEnabledFor(Object object) Returns whether the expression is valid for the given object.
public boolean
isEnabledForExpression(Object object, String expressionType) Returns whether or not the receiver is potentially valid for the object
via just the extension type.
final public static String EXP_TYPE_PLUG_IN_STATE(Code)
Constant definition for pluginState.
EXP_TYPE_SYSTEM_PROPERTY
final public static String EXP_TYPE_SYSTEM_PROPERTY(Code)
Constant definition for systemProperty.
Constructor Detail
ActionExpression
public ActionExpression(IConfigurationElement element)(Code)
Creates an action expression for the given configuration element.
Parameters: element - The element to build the expression from.
ActionExpression
public ActionExpression(String expressionType, String expressionValue)(Code)
Create an instance of the receiver with the given expression type and
value. Currently the only supported expression type is
EXP_TYPE_OBJECT_CLASS.
Parameters: expressionType - The expression constant we are creating an instance of. Parameters: expressionValue - The name of the class we are creating an expression for.
Extract the object class test from the expression. This allows clients
(e.g. the decorator manager) to handle object class testing in a more
optimized way. This method removes the objectClass test from the
expression and returns the object class. The expression is not changed
and a null is returned if no object class is found.
the object class or null if none was found.
Computes the hash code for this object based on the id.
The hash code for this object.
isEnabledFor
public boolean isEnabledFor(IStructuredSelection selection)(Code)
Returns whether the expression is valid for all elements of the given
selection.
Parameters: selection - the structured selection to use boolean whether the expression is valid for the selection.
Returns whether the expression is valid for the given object.
Parameters: object - the object to validate against (can be null) boolean whether the expression is valid for the object.
isEnabledForExpression
public boolean isEnabledForExpression(Object object, String expressionType)(Code)
Returns whether or not the receiver is potentially valid for the object
via just the extension type. Currently the only supported expression type
is EXP_TYPE_OBJECT_CLASS.
Parameters: object - the object to validate against (can be null) Parameters: expressionType - the expression type to consider boolean whether the expression is potentially valid for theobject.
Return the values of the expression type that the receiver is enabled
for. If the receiver is not enabled for the expressionType then return
null.
Parameters: expressionType - the expression type to consider Collection if there are values for this expression ornull if this is not possible in the receiver orany of it's children