Bug 117965 [DataBinding] Change tests plugin to pre-req examples
This will allow the UI tests in examples to make use of the pojo model
tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/ScenariosTestCase.java
public static void invokeNonUI(final Runnable aRunnable){
		
		final RuntimeException[] nonUIException = new RuntimeException[1];
		Thread t = new Thread(aRunnable){
			public void run(){
				try{
					super.run();
				} catch (Exception exc){
					RuntimeException runtimeException = new RuntimeException(exc);
					runtimeException.fillInStackTrace();
					nonUIException[0] = runtimeException; 
					exc.printStackTrace();
				}
			}
		};
		t.start();
		while(t.isAlive()) {
			while(Display.getCurrent().readAndDispatch());
			try {
				t.join(100);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
		if(nonUIException[0] != null){
			throw nonUIException[0];
		}
	}
}