Package org.eclipse.ui.activities
Interface IIdentifier
- All Superinterfaces:
Comparable<IIdentifier>
An instance of this interface can be obtained from an instance of
IActivityManager
for any identifier.
An IIdentifier
is an object that offers an easy means to
determine if a given string matches the pattern bindings of any IActivity
objects. Additionaly, one may query if an identifier is enabled. An
identifier is always considered enabled unless it matches only disabled
activities.
The handle-based nature of this API allows it to work well with runtime plugin activation and deactivation, which can cause dynamic changes to the extension registry.
This interface is not intended to be extended or implemented by clients.
- Since:
- 3.0
- See Also:
- Restriction:
- This interface is not intended to be implemented by clients.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addIdentifierListener
(IIdentifierListener identifierListener) Registers an instance ofIIdentifierListener
to listen for changes to properties of this instance.Returns the set of activity ids that this instance matches.getId()
Returns the identifier of this instance.boolean
Returns whether or not this instance is enabled.void
removeIdentifierListener
(IIdentifierListener identifierListener) Removes an instance ofIIdentifierListener
listening for changes to properties of this instance.Methods inherited from interface java.lang.Comparable
compareTo
-
Method Details
-
addIdentifierListener
Registers an instance ofIIdentifierListener
to listen for changes to properties of this instance.- Parameters:
identifierListener
- the instance to register. Must not benull
. If an attempt is made to register an instance which is already registered with this instance, no operation is performed.
-
getActivityIds
Returns the set of activity ids that this instance matches. Each activity in this set will have at least one pattern binding that matches the string returned bygetId()
.Notification is sent to all registered listeners if this property changes.
- Returns:
- the set of activity ids that this instance matches. This set may be
empty, but is guaranteed not to be
null
. If this set is not empty, it is guaranteed to only contain instances ofString
.
-
getId
String getId()Returns the identifier of this instance.- Returns:
- the identifier of this instance. Guaranteed not to be
null
.
-
isEnabled
boolean isEnabled()Returns whether or not this instance is enabled. An identifier is always considered enabled unless it matches only disabled activities.Notification is sent to all registered listeners if this property changes.
- Returns:
true
, iff this instance is enabled.
-
removeIdentifierListener
Removes an instance ofIIdentifierListener
listening for changes to properties of this instance.- Parameters:
identifierListener
- the instance to remove. Must not benull
. If an attempt is made to remove an instance which is not already registered with this instance, no operation is performed.
-