Class StatusManagerHelper


  • public class StatusManagerHelper
    extends Object
    This class is common place for error handling and message propagation in plug-ins. It is merely a shortcut-utility: in its methods it constructs an IStatus object and feeds it to StatusManager. It is intended to be instantiated as follows.
    private static final CommonStatusHandler statusHandler = new CommonStatusHandler(PLUGIN_ID);
    • Constructor Detail

      • StatusManagerHelper

        public StatusManagerHelper​(String pluginID)
        Constructs a StatusManagerHelper, which uses the provided pluginID in each status report.
        Parameters:
        pluginID -
    • Method Detail

      • logWarning

        public void logWarning​(String message)
        Parameters:
        showModal - true if the message and the cause should be shown in a modal dialog; otherwise the they will be only logged
        See Also:
        StatusManager.handle(IStatus, int)
      • handle

        public void handle​(int severity,
                           String message,
                           Throwable exception,
                           int style)
        Constructs an IStatus object and feeds it to StatusManager.handle(IStatus, int).
        Parameters:
        severity - severity of the created IStatus
        message - the message for the created IStatus
        exception - the exception for the created IStatus
        style - the style for StatusManager.handle(IStatus, int)