|
Eclipse Platform Release 3.3 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.ui.statushandlers.StatusAdapter
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.
Field Summary | |
---|---|
static QualifiedName |
TIMESTAMP_PROPERTY
This property is used to add timestamp to the adapter. |
static QualifiedName |
TITLE_PROPERTY
This property is used to add title to the adapter. |
Constructor Summary | |
---|---|
StatusAdapter(IStatus status)
Creates an instance of this class. |
Method Summary | |
---|---|
void |
addAdapter(Class adapter,
Object object)
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. |
Object |
getAdapter(Class adapter)
Returns an object which is an instance of the given class associated with this object. |
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. |
IStatus |
getStatus()
Returns the wrapped status. |
void |
setProperty(QualifiedName key,
Object value)
Sets the value of the receiver's property identified by the given key. |
void |
setStatus(IStatus status)
Sets a new status for this adapter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final QualifiedName TITLE_PROPERTY
public static final QualifiedName TIMESTAMP_PROPERTY
Constructor Detail |
public StatusAdapter(IStatus status)
status
- the status to wrap. May not be null
.Method Detail |
public void addAdapter(Class adapter, Object object)
IAdaptable.getAdapter(Class)
is called on the receiver with Class
adapter as a parameter.
adapter
- the adapter classobject
- the adapter instancepublic Object getAdapter(Class adapter)
IAdaptable
null
if
no such object can be found.
getAdapter
in interface IAdaptable
adapter
- the adapter class to look up
null
if this object does not
have an adapter for the given classpublic IStatus getStatus()
setStatus(IStatus)
. Will not be null
.public void setStatus(IStatus status)
status
- the status to set. May not be null
.public Object getProperty(QualifiedName key)
null
if this adapter has no such property.
key
- the qualified name of the property
null
if this adapter
has no such propertypublic void setProperty(QualifiedName key, Object value)
key
- the qualified name of the propertyvalue
- the value of the property
|
Eclipse Platform Release 3.3 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2007. All rights reserved.