Bug 29163 SafeRunnable needs to be accessible in JFace
We need to be able to access the SafeRunnable in JFace in order that some error protection can be added to preferences and properties dialogs.
bundles/org.eclipse.ui.workbench/extensions/org/eclipse/jface/operation/ModalContext.java
*  this method is called outside the dynamic scope of any
 *  invocation of <code>ModalContext.run</code>
 */
public static int getModalLevel() {
	return modalLevel;
}
/**
 * Returns whether the given thread is running a modal context.
 *
 * @return <code>true</code> if the given thread is running a modal context, <code>false</code> if not
 */
public static boolean isModalContextThread(Thread thread) {
	return thread instanceof ModalContextThread;
}
/**
 * Runs the given runnable in a modal context, passing it a progress monitor.
 * <p>
 * The modal nesting level is increased by one from the perspective
 * of the given runnable.
 * </p>
 *
 * @param operation the runnable to run
 * @param fork <code>true</code> if the runnable should run in a separate thread,
 *   and <code>false</code> if in the same thread
 * @param monitor the progress monitor to use to display progress and receive
 *   requests for cancelation
 * @param display the display to be used to read and dispatch events
 * @exception InvocationTargetException if the run method must propagate a checked exception,
 * 	it should wrap it inside an <code>InvocationTargetException</code>; runtime exceptions and errors are automatically
 *  wrapped in an <code>InvocationTargetException</code> by this method