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 anIStatus
object 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 providedpluginID
in each status report.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
handle(int severity, String message, Throwable exception, int style)
Constructs anIStatus
object and feeds it toStatusManager.handle(IStatus, int)
.void
logError(String errorMessage, Throwable errorCause)
void
logWarning(String message)
void
showError(String errorMessage, Throwable errorCause)
-
-
-
Constructor Detail
-
StatusManagerHelper
public StatusManagerHelper(String pluginID)
Constructs aStatusManagerHelper
, which uses the providedpluginID
in 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 anIStatus
object and feeds it toStatusManager.handle(IStatus, int)
.- Parameters:
severity
- severity of the createdIStatus
message
- the message for the createdIStatus
exception
- the exception for the createdIStatus
style
- the style forStatusManager.handle(IStatus, int)
-
-