Class ContextManagerEvent
java.lang.Object
org.eclipse.core.commands.common.AbstractBitSetEvent
org.eclipse.core.commands.contexts.ContextManagerEvent
An event indicating that the set of defined context identifiers has changed.
- Since:
- 3.1
- See Also:
-
Field Summary
Fields inherited from class org.eclipse.core.commands.common.AbstractBitSetEvent
changedValues -
Constructor Summary
ConstructorsConstructorDescriptionContextManagerEvent(ContextManager contextManager, String contextId, boolean contextIdAdded, boolean activeContextsChanged, Set previouslyActiveContextIds) Creates a new instance of this class. -
Method Summary
Modifier and TypeMethodDescriptionfinal StringReturns the context identifier that was added or removed.final ContextManagerReturns the instance of the interface that changed.final SetReturns the set of identifiers to previously active contexts.final booleanReturns whether the active context identifiers have changed.final booleanReturns whether the list of defined context identifiers has changed.final booleanReturns whether the context identifier became defined.
-
Constructor Details
-
ContextManagerEvent
public ContextManagerEvent(ContextManager contextManager, String contextId, boolean contextIdAdded, boolean activeContextsChanged, Set previouslyActiveContextIds) Creates a new instance of this class.- Parameters:
contextManager- the instance of the interface that changed; must not benull.contextId- The context identifier that was added or removed; may benullif the active contexts are changing.contextIdAdded- Whether the context identifier became defined (otherwise, it became undefined).activeContextsChanged- Whether the list of active contexts has changed.previouslyActiveContextIds- the set of identifiers of previously active contexts. This set may be empty. If this set is not empty, it must only contain instances ofString. This set must benullif activeContextChanged isfalseand must not be null if activeContextChanged istrue.
-
-
Method Details
-
getContextId
Returns the context identifier that was added or removed.- Returns:
- The context identifier that was added or removed. This value may
be
nullif no context identifier was added or removed.
-
getContextManager
Returns the instance of the interface that changed.- Returns:
- the instance of the interface that changed. Guaranteed not to be
null.
-
getPreviouslyActiveContextIds
Returns the set of identifiers to previously active contexts.- Returns:
- the set of identifiers to previously active contexts. This set
may be empty. If this set is not empty, it is guaranteed to only
contain instances of
String. This set is guaranteed to benullif haveActiveContextChanged() isfalseand is guaranteed to not benullif haveActiveContextsChanged() istrue.
-
isActiveContextsChanged
public final boolean isActiveContextsChanged()Returns whether the active context identifiers have changed.- Returns:
trueif the collection of active contexts changed;falseotherwise.
-
isContextChanged
public final boolean isContextChanged()Returns whether the list of defined context identifiers has changed.- Returns:
trueif the list of context identifiers has changed;falseotherwise.
-
isContextDefined
public final boolean isContextDefined()Returns whether the context identifier became defined. Otherwise, the context identifier became undefined.- Returns:
trueif the context identifier became defined;falseif the context identifier became undefined.
-