public interface IActivity extends Comparable
org.eclipse.ui.activities
.
An instance of this interface can be obtained from an instance of
IActivityManager
for any identifier, whether or not an activity
with that identifier is defined in the extension registry.
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. A client may get an IActivity
handle that
is currently undefined (isDefined()
equals false
) and
listen for it to become defined.
This interface is not intended to be extended or implemented by clients.
IActivityManager
Modifier and Type | Method and Description |
---|---|
void |
addActivityListener(IActivityListener activityListener)
Registers an instance of
IActivityListener to listen for
changes to properties of this instance. |
Set |
getActivityPatternBindings()
Returns the set of activity pattern bindings for this instance.
|
Set |
getActivityRequirementBindings()
Returns the set of activity requirement bindings for this instance.
|
String |
getDescription()
Returns the description of this instance suitable for display to the user.
|
Expression |
getExpression()
Return an expression used to enable and disable this activity.
|
String |
getId()
Returns the identifier of this instance.
|
String |
getName()
Returns the name of this instance suitable for display to the user.
|
boolean |
isDefaultEnabled()
Returns whether or not this instance should be enabled by default.
|
boolean |
isDefined()
Returns whether or not this instance is defined.
|
boolean |
isEnabled()
Returns whether or not this instance is enabled.
|
void |
removeActivityListener(IActivityListener activityListener)
Removes an instance of
IActivityListener listening
for changes to properties of this instance. |
compareTo
void addActivityListener(IActivityListener activityListener)
IActivityListener
to listen for
changes to properties of this instance.activityListener
- the instance to register. Must not be null
.
If an attempt is made to register an instance which is
already registered with this instance, no operation is
performed.Set getActivityRequirementBindings()
This method will return all activity requirement bindings for this instance, whether or not this instance is defined.
Notification is sent to all registered listeners if this property changes.
null
. If this set is
not empty, it is guaranteed to only contain instances of
IActivityRequirementBinding
.IActivityRequirementBinding
Set getActivityPatternBindings()
This method will return all activity pattern bindings for this instance, whether or not this instance is defined.
Notification is sent to all registered listeners if this property changes.
null
. If this set is not
empty, it is guaranteed to only contain instances of IActivityPatternBinding
.IActivityPatternBinding
String getId()
null
.String getName() throws NotDefinedException
Notification is sent to all registered listeners if this property changes.
null
.NotDefinedException
- if this instance is not defined.String getDescription() throws NotDefinedException
Notification is sent to all registered listeners if this property changes.
null
.NotDefinedException
- if this instance is not defined.boolean isDefined()
Notification is sent to all registered listeners if this property changes.
true
, iff this instance is defined.boolean isEnabled()
Notification is sent to all registered listeners if this property changes.
true
, iff this instance is enabled.boolean isDefaultEnabled() throws NotDefinedException
true
, iff this instance should be enabled by default.NotDefinedException
- if this instance is not defined.void removeActivityListener(IActivityListener activityListener)
IActivityListener
listening
for changes to properties of this instance.activityListener
- the instance to remove. Must not be null
.
If an attempt is made to remove an instance which is not
already registered with this instance, no operation is
performed.Expression getExpression()
null
, this activity will be entirely
controlled by the expression state.null
Copyright (c) 2000, 2018 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.