Status handlers are part of the status handling facility. The facility is
responsible for handling errors and other important issues in Eclipse based
applications. The handlers are responsible for presenting this errors by
logging or showing error dialogs.
All status handlers extends
org.eclipse.ui.statushandlers.AbstractStatusHandler . Each
handler implements handle(StatusAdapter status, int style) .
This method handles statuses due to handling style. The style indicates how
status handler should handle a status.
For acceptable styles check
StatusManager .
Handlers shoudn't be used directly but through the
StatusManager . It
chooses which handler should be used for handling. There are two ways for
adding handlers to the handling flow. First using extension point
org.eclipse.ui.statusHandlers , second by the workbench
advisor and its method
WorkbenchAdvisor.getWorkbenchErrorHandler .
If a handler is associated with a product, it is used instead of this defined
in advisor.
A status handler has the id and a set of parameters. The handler can use them
during handling. If the handler is added as an extension, both are set during
initialization of the handler using elements and attributes of
statusHandler element.
since: 3.3 |