public final class ContextManagerEvent extends AbstractBitSetEvent
An event indicating that the set of defined context identifiers has changed.
IContextManagerListener.contextManagerChanged(ContextManagerEvent)
changedValues
Constructor and Description |
---|
ContextManagerEvent(ContextManager contextManager,
String contextId,
boolean contextIdAdded,
boolean activeContextsChanged,
Set previouslyActiveContextIds)
Creates a new instance of this class.
|
Modifier and Type | Method and Description |
---|---|
String |
getContextId()
Returns the context identifier that was added or removed.
|
ContextManager |
getContextManager()
Returns the instance of the interface that changed.
|
Set |
getPreviouslyActiveContextIds()
Returns the set of identifiers to previously active contexts.
|
boolean |
isActiveContextsChanged()
Returns whether the active context identifiers have changed.
|
boolean |
isContextChanged()
Returns whether the list of defined context identifiers has changed.
|
boolean |
isContextDefined()
Returns whether the context identifier became defined.
|
public ContextManagerEvent(ContextManager contextManager, String contextId, boolean contextIdAdded, boolean activeContextsChanged, Set previouslyActiveContextIds)
contextManager
- the instance of the interface that changed; must not be
null
.contextId
- The context identifier that was added or removed; may be
null
if 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 of String
. This set must be
null
if activeContextChanged is
false
and must not be null if
activeContextChanged is true
.public final String getContextId()
null
if no context identifier was added or
removed.public final ContextManager getContextManager()
null
.public final Set getPreviouslyActiveContextIds()
String
. This set is
guaranteed to be null
if
haveActiveContextChanged() is false
and is
guaranteed to not be null
if
haveActiveContextsChanged() is true
.public final boolean isActiveContextsChanged()
true
if the collection of active contexts changed;
false
otherwise.public final boolean isContextChanged()
true
if the list of context identifiers has
changed; false
otherwise.public final boolean isContextDefined()
true
if the context identifier became defined;
false
if the context identifier became undefined.
Copyright (c) 2000, 2018 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.