Activates the given context within the context of this service. If this service was retrieved from the workbench, then this context will be active globally. If the service was retrieved from a nested component, then the context will only be active within that component.
Also, it is guaranteed that the contexts submitted through a particular service will be cleaned up when that services is destroyed. So, for example, a service retrieved from a IWorkbenchPartSite
would deactivate all of its contexts when the site is destroyed.
@param contextId The identifier for the context which should be activated; must not be
null
.
@return A token which can be used to later cancel the activation. Onlysomeone with access to this token can cancel the activation. The activation will automatically be cancelled if the context from which this service was retrieved is destroyed.