Package org.eclipse.ui.handlers
Interface IHandlerActivation
- All Superinterfaces:
- Comparable,- org.eclipse.ui.internal.services.IEvaluationResultCache
public interface IHandlerActivation
extends org.eclipse.ui.internal.services.IEvaluationResultCache, Comparable
A token representing the activation of a handler. This token can later be used to cancel that activation. Without this token, then handler will only become inactive if the component in which the handler was activated is destroyed.
This interface is not intended to be implemented or extended by clients.
- Since:
- 3.1
- See Also:
- 
Field SummaryFields
- 
Method SummaryModifier and TypeMethodDescriptionvoidDeprecated.Returns the identifier of the command whose handler is being activated.intgetDepth()Returns the depth at which this activation was created within the services hierarchy.Returns the handler that should be activated.Returns the handler service from which this activation was requested.booleanisActive(IEvaluationContext context) Deprecated.UseIEvaluationResultCache.evaluate(IEvaluationContext)instead.Methods inherited from interface java.lang.ComparablecompareToMethods inherited from interface org.eclipse.ui.internal.services.IEvaluationResultCacheclearResult, evaluate, getExpression, getSourcePriority, setResult
- 
Field Details- 
ROOT_DEPTHstatic final int ROOT_DEPTHThe depth at which the root exists.- Since:
- 3.2
- See Also:
 
 
- 
- 
Method Details- 
clearActiveDeprecated.UseIEvaluationResultCache.clearResult()instead.Clears the cached computation of theisActivemethod, if any. This method is only intended for internal use. It provides a mechanism by whichISourceProviderevents can invalidate state on aIHandlerActivationinstance.
- 
getCommandIdString getCommandId()Returns the identifier of the command whose handler is being activated.- Returns:
- The command identifier; never null.
 
- 
getDepthint getDepth()Returns the depth at which this activation was created within the services hierarchy. The root of the hierarchy is at a depth of1. This is used as the final tie-breaker in the event that no other method can be used to determine a winner.- Returns:
- The depth at which the handler was inserted into the services hierarchy; should be a positive integer.
- Since:
- 3.2
 
- 
getHandlerIHandler getHandler()Returns the handler that should be activated.- Returns:
- The handler; may be null.
 
- 
getHandlerServiceIHandlerService getHandlerService()Returns the handler service from which this activation was requested. This is used to ensure that an activation can only be retracted from the same service which issued it.- Returns:
- The handler service; never null.
 
- 
isActiveDeprecated.UseIEvaluationResultCache.evaluate(IEvaluationContext)instead.Returns whether this handler activation is currently active -- given the current state of the workbench. This method should cache its computation. The cache will be cleared by a call toclearActive.- Parameters:
- context- The context in which this state should be evaluated; must not be- null.
- Returns:
- trueif the activation is currently active;- falseotherwise.
 
 
- 
IEvaluationResultCache.clearResult()instead.