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 Type
    Method
    Description
    void
    Deprecated.
    Use IEvaluationResultCache.clearResult() instead.
    Returns the identifier of the context that is being activated.
    Returns the context service from which this activation was requested.
    boolean
    Deprecated.
    Use IEvaluationResultCache.evaluate(IEvaluationContext) instead.

    Methods inherited from interface org.eclipse.ui.internal.services.IEvaluationResultCache

    clearResult, evaluate, getExpression, getSourcePriority, setResult
  • Method Details

    • clearActive

      @Deprecated void clearActive()
      Deprecated.
      Use IEvaluationResultCache.clearResult() instead.
      Clears the cached computation of the isActive method, if any. This method is only intended for internal use. It provides a mechanism by which ISourceProvider events can invalidate state on a IContextActivation instance.
    • 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 boolean isActive(IEvaluationContext context)
      Deprecated.
      Use IEvaluationResultCache.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 to clearActive.
      Parameters:
      context - The context in which this state should be evaluated; must not be null.
      Returns:
      true if the activation is currently active; false otherwise.