Package org.eclipse.ui.contexts
Interface IContextActivation
- All Superinterfaces:
org.eclipse.ui.internal.services.IEvaluationResultCache
public interface IContextActivation
extends org.eclipse.ui.internal.services.IEvaluationResultCache
A token representing the activation of a context. This token can later be used to cancel that activation. Without this token, then context will only become inactive if the component in which the context was activated is destroyed.
This interface is not intended to be implemented or extended by clients.
- Since:
- 3.1
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated.Returns the identifier of the context that is being activated.Returns the context service from which this activation was requested.booleanisActive(IEvaluationContext context) Deprecated.UseIEvaluationResultCache.evaluate(IEvaluationContext)instead.Methods inherited from interface org.eclipse.ui.internal.services.IEvaluationResultCache
clearResult, evaluate, getExpression, getSourcePriority, setResult
-
Method Details
-
clearActive
Deprecated.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 aIContextActivationinstance. -
getContextId
String getContextId()Returns the identifier of the context that is being activated.- Returns:
- The context identifier; never
null.
-
getContextService
IContextService getContextService()Returns the context 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 context service; never
null.
-
isActive
Deprecated.UseIEvaluationResultCache.evaluate(IEvaluationContext)instead.Returns whether this context 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 benull.- Returns:
trueif the activation is currently active;falseotherwise.
-
IEvaluationResultCache.clearResult()instead.