plugin/src/com/carrotgarden/eclipse/space/util/JobUtil.java
/**
	 * Sleep method that puts the current thread to sleep for some time and then
	 * returns. This method should be safe to call from UI or non-ui threads.
	 * <p>
	 * When called from UI threads it will ensure the UI event queue keeps
	 * getting processed while sleeping.
	 */
Sleep method that puts the current thread to sleep for some time and then
returns. This method should be safe to call from UI or non-ui threads.

When called from UI threads it will ensure the UI event queue keeps
getting processed while sleeping.
Sleep method that puts the current thread to sleep for some time and then returns . This method should be safe to call from UI or non - ui threads . When called from UI threads it will ensure the UI event queue keeps getting processed while sleeping .
public static void sleep() {
		final Display display = Display.getCurrent();
		if (display != null) {
			display.readAndDispatch();
			display.sleep();
		} else {
			try {
				Thread.sleep(1000);
			} catch (final InterruptedException e) {
			}
		}
	}
public static void sleep ( ) { final Display display = Display . getCurrent ( ) ; if ( display != null ) { display . readAndDispatch ( ) ; display . sleep ( ) ; } else { try { Thread . sleep ( 1000 ) ; } catch ( final InterruptedException e ) { } } }
Sleep method that puts the current thread to sleep for some time and then
 returns.
Sleep method that puts the current thread to sleep for some time and then returns .
// We are running in UI thread // We are not running in UI thread