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
Answertopia.com

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

  




 

 

Eclipse Plug-in Developer Guide
Previous Page Home Next Page

Defining a product status handler

The AbstractStatusHandler class and the org.eclipse.ui.statusHandlers extension point make up the generic mechanism that can be used to customize problem handling for the given product. The main purpose of this extension is to define status handlers (which extends AbstractStatusHandler) and to specify the binding between a product and a status handler. For example, the following contribution defines a hypothetical status handler to be used by the workbench:

   <extension point="org.eclipse.ui.statusHandlers"> 
      <statusHandler
            class="org.eclipse.ui.statushandlers.SampleStatusHandler"
            id="sampleStatusHandler"/>
      <statusHandlerProductBinding
            handlerId="sampleStatusHandler"
            productId="productId">
      </introProductBinding>
   </extension> 

This contribution first defines the status handler and assigns it the id "sampleStatusHandler". It then binds this handler to a product whose id is "productId". When the status handling facility is accessed first time, the class specified in the class attribute will be instantiated by the workbench and used for handling of status or error occurred in the product.

The platform supplies its own AbstractStatusHandler implementation called WorkbenchErrorHandler.


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