| java.lang.Object org.eclipse.ui.statushandlers.StatusAdapter
StatusAdapter | public class StatusAdapter implements IAdaptable(Code) | |
The StatusAdapter wraps an instance of IStatus subclass and can hold
additional information either by using properties or by adding a new adapter. Used during
status handling process.
since: 3.3 |
Field Summary | |
final static String | PROPERTY_PREFIX Common prefix for properties defined in this class. | final public static QualifiedName | TIMESTAMP_PROPERTY This property is used to add timestamp to the adapter. | final public static QualifiedName | TITLE_PROPERTY This property is used to add title to the adapter. |
Constructor Summary | |
public | StatusAdapter(IStatus status) Creates an instance of this class.
Parameters: status - the status to wrap. |
Method Summary | |
public void | addAdapter(Class adapter, Object object) Associates new object which is an instance of the given class with this
adapter. | public Object | getAdapter(Class adapter) | public Object | getProperty(QualifiedName key) Returns the value of the adapter's property identified by the given key,
or null if this adapter has no such property. | public IStatus | getStatus() Returns the wrapped status.
the wrapped status set in the constructor or insetStatus(IStatus) . | public void | setProperty(QualifiedName key, Object value) Sets the value of the receiver's property identified by the given key. | public void | setStatus(IStatus status) Sets a new status for this adapter.
Parameters: status - the status to set. |
PROPERTY_PREFIX | final static String PROPERTY_PREFIX(Code) | | Common prefix for properties defined in this class.
|
TIMESTAMP_PROPERTY | final public static QualifiedName TIMESTAMP_PROPERTY(Code) | | This property is used to add timestamp to the adapter. If the adapter is
shown in the UI, this property can be used for sorting and showing
information about the time of status creation.
|
TITLE_PROPERTY | final public static QualifiedName TITLE_PROPERTY(Code) | | This property is used to add title to the adapter. If the adapter is
shown in a dialog, this property is used to create title of the dialog.
|
StatusAdapter | public StatusAdapter(IStatus status)(Code) | | Creates an instance of this class.
Parameters: status - the status to wrap. May not be null . |
addAdapter | public void addAdapter(Class adapter, Object object)(Code) | | Associates new object which is an instance of the given class with this
adapter. object will be returned when
IAdaptable.getAdapter(Class) is called on the receiver with
Class adapter as a parameter.
Parameters: adapter - the adapter class Parameters: object - the adapter instance |
getProperty | public Object getProperty(QualifiedName key)(Code) | | Returns the value of the adapter's property identified by the given key,
or null if this adapter has no such property.
Parameters: key - the qualified name of the property the value of the property, or null if this adapterhas no such property |
getStatus | public IStatus getStatus()(Code) | | Returns the wrapped status.
the wrapped status set in the constructor or insetStatus(IStatus) . Will not be null . |
setProperty | public void setProperty(QualifiedName key, Object value)(Code) | | Sets the value of the receiver's property identified by the given key.
Parameters: key - the qualified name of the property Parameters: value - the value of the property |
setStatus | public void setStatus(IStatus status)(Code) | | Sets a new status for this adapter.
Parameters: status - the status to set. May not be null . |
|
|