Bug 223188 [ErrorHandling] Crash of ModalContext thread freezes UI thread
bundles/org.eclipse.jface/src/org/eclipse/jface/operation/ModalContext.java
* </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>