Interface IActivity
- All Superinterfaces:
Comparable<IActivity>
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.
- Since:
- 3.0
- See Also:
- Restriction:
- This interface is not intended to be implemented by clients.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addActivityListener
(IActivityListener activityListener) Registers an instance ofIActivityListener
to listen for changes to properties of this instance.Returns the set of activity pattern bindings for this instance.Returns the set of activity requirement bindings for this instance.Returns the description of this instance suitable for display to the user.Return an expression used to enable and disable this activity.getId()
Returns the identifier of this instance.getName()
Returns the name of this instance suitable for display to the user.boolean
Returns whether or not this instance should be enabled by default.boolean
Returns whether or not this instance is defined.boolean
Returns whether or not this instance is enabled.void
removeActivityListener
(IActivityListener activityListener) Removes an instance ofIActivityListener
listening for changes to properties of this instance.Methods inherited from interface java.lang.Comparable
compareTo
-
Method Details
-
addActivityListener
Registers an instance ofIActivityListener
to listen for changes to properties of this instance.- Parameters:
activityListener
- 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.
-
getActivityRequirementBindings
Set<IActivityRequirementBinding> getActivityRequirementBindings()Returns the set of activity requirement bindings for this instance.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.
- Returns:
- the set of activity requirement bindings. 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 ofIActivityRequirementBinding
. - See Also:
-
getActivityPatternBindings
Set<IActivityPatternBinding> getActivityPatternBindings()Returns the set of activity pattern bindings for this instance.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.
- Returns:
- the set of activity pattern bindings. 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 ofIActivityPatternBinding
. - See Also:
-
getId
String getId()Returns the identifier of this instance.- Returns:
- the identifier of this instance. Guaranteed not to be
null
.
-
getName
Returns the name of this instance suitable for display to the user.Notification is sent to all registered listeners if this property changes.
- Returns:
- the name of this instance. Guaranteed not to be
null
. - Throws:
NotDefinedException
- if this instance is not defined.
-
getDescription
Returns the description of this instance suitable for display to the user.Notification is sent to all registered listeners if this property changes.
- Returns:
- the description of this instance. Guaranteed not to be
null
. - Throws:
NotDefinedException
- if this instance is not defined.
-
isDefined
boolean isDefined()Returns whether or not this instance is defined. A defined activity may have a name, description and bindings (both pattern and relational).Notification is sent to all registered listeners if this property changes.
- Returns:
true
, iff this instance is defined.
-
isEnabled
boolean isEnabled()Returns whether or not this instance is enabled.Notification is sent to all registered listeners if this property changes.
- Returns:
true
, iff this instance is enabled.
-
isDefaultEnabled
Returns whether or not this instance should be enabled by default.- Returns:
true
, iff this instance should be enabled by default.- Throws:
NotDefinedException
- if this instance is not defined.- Since:
- 3.1
-
removeActivityListener
Removes an instance ofIActivityListener
listening for changes to properties of this instance.- Parameters:
activityListener
- 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.
-
getExpression
Expression getExpression()Return an expression used to enable and disable this activity. If the expression is notnull
, this activity will be entirely controlled by the expression state.- Returns:
- The core expression, or
null
- Since:
- 3.4
-