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
*    throw new InterruptedException();
 * </pre>
 * </p>
 *
 * @param monitor the progress monitor
 * @exception InterruptedException if cancelling the operation has been requested
 * @see IProgressMonitor#isCanceled
 */
public static void checkCanceled(IProgressMonitor monitor) throws InterruptedException {
	if (monitor.isCanceled())
		throw new InterruptedException();
}
/**
 * Returns the currently active modal context thread, or null if no modal context is active.
 */
private static ModalContextThread getCurrentModalContextThread() {
	Thread t = Thread.currentThread();
	if (t instanceof ModalContextThread)
		return (ModalContextThread) t;
	return null;
}
/**
 * Returns the modal nesting level.
 * <p>
 * The modal nesting level increases by one each time the
 * <code>ModalContext.run</code> method is called within the
 * dynamic scope of another call to <code>ModalContext.run</code>.
 * </p>
 *
 * @return the modal nesting level, or <code>0</code> if