Interface IContextActivation

  • All Superinterfaces:

    public interface IContextActivation

    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.

    See Also:
    ISources, ISourceProvider
    • Method Detail

      • clearActive

        void clearActive()
        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.
        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.
        The context service; never null.
      • isActive

        boolean isActive​(IEvaluationContext context)
        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.
        context - The context in which this state should be evaluated; must not be null.
        true if the activation is currently active; false otherwise.