Eclipse Question:

How to access UI objects from a non-ui thread?

Tweet Share WhatsApp

Answer:

Use Display.getDefault().asyncExec(new Runnable()...) Display.asyncExec causes the run() method of the runnable to be invoked by the user-interface thread at the next reasonable opportunity. The caller of this method continues to run in parallel, and is not notified when the runnable has completed.

Download Eclipse PDF Read All 16 Eclipse Questions
Previous QuestionNext Question
What are extensions and extension points?How to fire a key event in my test code to make the program act as if a user pressed a key?