@Deprecated public interface IContext extends Comparable
org.eclipse.ui.contexts
.
An instance of this interface can be obtained from an instance of
IContextManager
for any identifier, whether or not an context
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. If a context is defined, that means that
its corresponding plug-in is active. If the plug-in is then deactivated, the
context will still exist but it will be undefined. An attempts to use an
undefined context will result in a NotDefinedException
being
thrown.
This interface is not intended to be extended or implemented by clients.
IContextManager
,
Context
Modifier and Type | Method and Description |
---|---|
void |
addContextListener(IContextListener contextListener)
Deprecated.
Registers an instance of
IContextListener to listen for
changes to properties of this instance. |
String |
getId()
Deprecated.
Returns the identifier of this instance.
|
String |
getName()
Deprecated.
Returns the name of this instance suitable for display to the user.
|
String |
getParentId()
Deprecated.
Returns the identifier of the parent of this instance.
|
boolean |
isDefined()
Deprecated.
Returns whether or not this instance is defined.
|
boolean |
isEnabled()
Deprecated.
Returns whether or not this instance is enabled.
|
void |
removeContextListener(IContextListener contextListener)
Deprecated.
Unregisters an instance of
IContextListener listening for
changes to properties of this instance. |
compareTo
void addContextListener(IContextListener contextListener)
IContextListener
to listen for
changes to properties of this instance.contextListener
- 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.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 getParentId() 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.
boolean isEnabled()
Notification is sent to all registered listeners if this property changes.
void removeContextListener(IContextListener contextListener)
IContextListener
listening for
changes to properties of this instance.contextListener
- the instance to unregister. Must not be null
.
If an attempt is made to unregister an instance which is not
already registered with this instance, no operation is
performed.
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.