Eclipse Platform
Release 3.7

org.eclipse.ui.statushandlers
Class AbstractStatusAreaProvider

java.lang.Object
  extended by org.eclipse.jface.dialogs.ErrorSupportProvider
      extended by org.eclipse.ui.statushandlers.AbstractStatusAreaProvider

public abstract class AbstractStatusAreaProvider
extends ErrorSupportProvider

A status area provider creates an area that displays detailed information about StatusAdapter or IStatus.

The area provider can be set in WorkbenchStatusDialogManager as well as in JFace Policy since its extends ErrorSupportProvider.

Since:
3.4
See Also:
Policy.setErrorSupportProvider(ErrorSupportProvider), WorkbenchStatusDialogManager.setSupportAreaProvider(AbstractStatusAreaProvider), WorkbenchStatusDialogManager.setDetailsAreaProvider(AbstractStatusAreaProvider)

Constructor Summary
AbstractStatusAreaProvider()
           
 
Method Summary
 Control createSupportArea(Composite parent, IStatus status)
          Create an area for adding support components as a child of parent.
abstract  Control createSupportArea(Composite parent, StatusAdapter statusAdapter)
          Create an area for detailed support area as a child of the given parent.
 boolean validFor(IStatus status)
          This method is called before createSupportArea(Composite, IStatus) to check if the AbstractStatusAreaProvider will display any significant informations.
 boolean validFor(StatusAdapter statusAdapter)
          This method is called before createSupportArea(Composite, StatusAdapter) to check if the AbstractStatusAreaProvider will display any significant informations.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractStatusAreaProvider

public AbstractStatusAreaProvider()
Method Detail

createSupportArea

public abstract Control createSupportArea(Composite parent,
                                          StatusAdapter statusAdapter)
Create an area for detailed support area as a child of the given parent.

Parameters:
parent - A Composite that will host support area.
statusAdapter - The StatusAdapter to be supported.
Returns:
a control, that hold all support elements.

createSupportArea

public final Control createSupportArea(Composite parent,
                                       IStatus status)
Description copied from class: ErrorSupportProvider
Create an area for adding support components as a child of parent.

Specified by:
createSupportArea in class ErrorSupportProvider
Parameters:
parent - The parent Composite
status - The IStatus that is being displayed.
Returns:
Control

validFor

public boolean validFor(StatusAdapter statusAdapter)
This method is called before createSupportArea(Composite, StatusAdapter) to check if the AbstractStatusAreaProvider will display any significant informations. If not, then it will not be presented at all.

Parameters:
statusAdapter - - StatusAdapter for which status are will be requested.
Returns:
true if provider is able to process particular StatusAdapter
Since:
3.6

validFor

public final boolean validFor(IStatus status)
This method is called before createSupportArea(Composite, IStatus) to check if the AbstractStatusAreaProvider will display any significant informations. If not, then it will not be presented at all. This implementation wraps the IStatus into StatusAdapter and calls validFor(StatusAdapter).

Overrides:
validFor in class ErrorSupportProvider
Parameters:
status - - IStatus for which status are will be requested.
Returns:
true if provider is able to process particular IStatus
Since:
3.7

Eclipse Platform
Release 3.7

Guidelines for using Eclipse APIs.

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