Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.ui.statushandlers
Class StatusAdapter

java.lang.Object
  extended by 
org.eclipse.ui.statushandlers.StatusAdapter
All Implemented Interfaces:
IAdaptable

public class StatusAdapter
extends Object
implements IAdaptable

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
static  QualifiedName TIMESTAMP_PROPERTY
          Deprecated. use IStatusAdapterConstants.TIMESTAMP_PROPERTY instead
static  QualifiedName TITLE_PROPERTY
          Deprecated. use IStatusAdapterConstants.TITLE_PROPERTY instead
 
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

TITLE_PROPERTY

public static final 
QualifiedName TITLE_PROPERTY
Deprecated. use IStatusAdapterConstants.TITLE_PROPERTY instead
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.


TIMESTAMP_PROPERTY

public static final 
QualifiedName TIMESTAMP_PROPERTY
Deprecated. use IStatusAdapterConstants.TIMESTAMP_PROPERTY instead
This property is used to add a timestamp to the adapter. If the adapter is shown in the UI, this property can be used for sorting and showing information about the status creation time.

The property must be of type Long.

Constructor Detail

StatusAdapter

public StatusAdapter(
IStatus status)
Creates an instance of this class.

Parameters:
status - the status to wrap. May not be null.
Method Detail

addAdapter

public 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.

Parameters:
adapter - the adapter class
object - the adapter instance

getAdapter

public 
Object getAdapter(
Class adapter)
Description copied from interface: IAdaptable
Returns an object which is an instance of the given class associated with this object. Returns null if no such object can be found.

Specified by:
getAdapter in interface IAdaptable
Parameters:
adapter - the adapter class to look up
Returns:
a object castable to the given class, or null if this object does not have an adapter for the given class

getStatus

public 
IStatus getStatus()
Returns the wrapped status.

Returns:
the wrapped status set in the constructor or in setStatus(IStatus). Will not be null.

setStatus

public void setStatus(
IStatus status)
Sets a new status for this adapter.

Parameters:
status - the status to set. May not be null.

getProperty

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.

Parameters:
key - the qualified name of the property
Returns:
the value of the property, or null if this adapter has no such property

setProperty

public void setProperty(
QualifiedName key,
                        
Object value)
Sets the value of the receiver's property identified by the given key.

Parameters:
key - the qualified name of the property
value - the value of the property

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire