long timeout= System.currentTimeMillis() + 1000; while (!fEditor.isDirty() && System.currentTimeMillis() < timeout) EditorTestHelper.runEventQueue();
	private void measure(PerformanceMeter performanceMeter, int runs) throws Exception {		IAction action= fEditor.getAction(ITextEditorActionConstants.FIND);		Display display= EditorTestHelper.getActiveDisplay();		for (int i= 0; i < runs; i++) {			fEditor.selectAndReveal(0, 0);			runAction(action);			SWTEventHelper.pressKeyChar(display, FIND);			SWTEventHelper.pressKeyChar(display, SWT.TAB);			SWTEventHelper.pressKeyChar(display, REPLACE);			performanceMeter.start();			SWTEventHelper.keyCodeDown(display, SWT.MOD3, true);			SWTEventHelper.pressKeyChar(display, 'a');			SWTEventHelper.keyCodeUp(display, SWT.MOD3, true);			performanceMeter.stop();			SWTEventHelper.pressKeyChar(display, SWT.ESC);			assertTrue(fEditor.isDirty());			EditorTestHelper.revertEditor(fEditor, true);			EditorTestHelper.joinBackgroundActivities(fEditor);		}	}