java.lang.Object
org.eclipse.jface.util.SafeRunnable
- All Implemented Interfaces:
- org.eclipse.core.runtime.ISafeRunnable
- public abstract class SafeRunnable
- extends java.lang.Object
- implements org.eclipse.core.runtime.ISafeRunnable
Implements a default implementation of ISafeRunnable.
The default implementation of handleException
opens a message dialog.
Note: This class can open an error dialog and should not
be used outside of the UI Thread.
|
Constructor Summary |
SafeRunnable()
Creates a new instance of SafeRunnable with a default error message. |
SafeRunnable(java.lang.String message)
Creates a new instance of SafeRunnable with the given error message. |
|
Method Summary |
static boolean |
getIgnoreErrors()
Flag to avoid interactive error dialogs during automated testing. |
static boolean |
getIgnoreErrors(boolean flag)
Deprecated. use getIgnoreErrors() |
void |
handleException(java.lang.Throwable e)
Handles an exception thrown by this runnable's run
method. |
static void |
setIgnoreErrors(boolean flag)
Flag to avoid interactive error dialogs during automated testing. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
message
private java.lang.String message
ignoreErrors
private static boolean ignoreErrors
SafeRunnable
public SafeRunnable()
- Creates a new instance of SafeRunnable with a default error message.
SafeRunnable
public SafeRunnable(java.lang.String message)
- Creates a new instance of SafeRunnable with the given error message.
handleException
public void handleException(java.lang.Throwable e)
- Description copied from interface:
org.eclipse.core.runtime.ISafeRunnable
- Handles an exception thrown by this runnable's
run
method. The processing done here should be specific to the
particular usecase for this runnable. Generalized exception
processing (e.g., logging in the platform's log) is done by the
Platform's run mechanism.
- Specified by:
handleException in interface org.eclipse.core.runtime.ISafeRunnable
getIgnoreErrors
public static boolean getIgnoreErrors(boolean flag)
- Deprecated. use getIgnoreErrors()
- Flag to avoid interactive error dialogs during automated testing.
getIgnoreErrors
public static boolean getIgnoreErrors()
- Flag to avoid interactive error dialogs during automated testing.
- Since:
- 3.0
setIgnoreErrors
public static void setIgnoreErrors(boolean flag)
- Flag to avoid interactive error dialogs during automated testing.