Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 301679

Summary: Display.asyncExec does not execute 'in time'
Product: [RT] RAP Reporter: Erdal Karaca <erdal.karaca.de>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Demo project to show the Display.asyncExec bug none

Description Erdal Karaca CLA 2010-02-03 05:12:21 EST
Build Identifier: 

Scenario:
I have a Label that has to be refreshed once a second to show the current time.
This is done in a Runnable that is passed to Display.asyncExec. Unfortunately, the Runnable is not executed, until the user triggers its execution by clicking somewhere in the UI/browser.

Reproducible: Always

Steps to Reproduce:
see demo project to be attached...
Comment 1 Erdal Karaca CLA 2010-02-03 05:15:18 EST
Created attachment 158017 [details]
Demo project to show the Display.asyncExec bug

A control contribution is added to the cool bar. This control contribution shows a Label that shoult be refreshed once in a second.

To trigger the refresh, click on the title of the "Login" view.
Comment 2 RĂ¼diger Herrmann CLA 2010-02-03 11:10:30 EST
The UICallback mechanism must be activated and deactivated manually when using "bare" threads (as opposed to using Jobs)
See the FAQ (http://wiki.eclipse.org/RAP/FAQ):
* How to update the UI from a background thread
* How to update the UI from a background thread in RWT standalone
Comment 3 Erdal Karaca CLA 2010-02-03 11:24:40 EST
Sorry, my fault!