Package com._1c.g5.v8.dt.common.ui
Class StatusManagerHelper
- java.lang.Object
-
- com._1c.g5.v8.dt.common.ui.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 anIStatusobject and feeds it toStatusManager. It is intended to be instantiated as follows.
private static final CommonStatusHandler statusHandler = new CommonStatusHandler(PLUGIN_ID);
-
-
Constructor Summary
Constructors Constructor Description StatusManagerHelper(String pluginID)Constructs aStatusManagerHelper, which uses the providedpluginIDin each status report.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidhandle(int severity, String message, Throwable exception, int style)Constructs anIStatusobject and feeds it toStatusManager.handle(IStatus, int).voidlogError(String errorMessage, Throwable errorCause)voidlogWarning(String message)voidshowError(String errorMessage, Throwable errorCause)
-
-
-
Constructor Detail
-
StatusManagerHelper
public StatusManagerHelper(String pluginID)
Constructs aStatusManagerHelper, which uses the providedpluginIDin each status report.- Parameters:
pluginID-
-
-
Method Detail
-
showError
public void showError(String errorMessage, Throwable errorCause)
- See Also:
StatusManager.handle(IStatus, int),handle(int, String, Throwable, int)
-
logError
public void logError(String errorMessage, Throwable errorCause)
- See Also:
handle(int, String, Throwable, int)
-
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 anIStatusobject and feeds it toStatusManager.handle(IStatus, int).- Parameters:
severity- severity of the createdIStatusmessage- the message for the createdIStatusexception- the exception for the createdIStatusstyle- the style forStatusManager.handle(IStatus, int)
-
-