public final class ModelUtil extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ModelUtil.InUIThreadException |
Modifier and Type | Method and Description |
---|---|
static void |
assertNonUIThread(String message,
Object... arguments) |
static IStatus |
checkNonUIThread(String message,
Object... arguments)
Logs and returns an warning if we are in a non-UI thread.
|
static boolean |
inUIThread()
Returns true if called from a user interface thread.
|
public static boolean inUIThread()
public static IStatus checkNonUIThread(String message, Object... arguments)
message
- the message for the status returned and logged. See
MessageFormat.format(String, Object...)
arguments
- arguments to the message.Status.OK_STATUS
if we are in a non-UI thread, or a
warning status (that has also been logged) called from an UI
thread.public static void assertNonUIThread(String message, Object... arguments)
message
- arguments
- ModelUtil.InUIThreadException
- when called from a UI thread.