Populating a table asynchronously [message #334844] |
Mon, 02 March 2009 23:39  |
Eclipse User |
|
|
|
Hi all,
I have a problem. I've been up all night trying to create a simple dialog
containing a table that will fill up as a background job supplies the info.
To be more precise, the job does a svn checkout and I want to show the
progress (files downloaded so far) in a table. Problem is I don't know how
to set the input for the table's content provider without freezing the UI.
An example would help a lot... thanks!
|
|
|
|
|
|
|
Re: Populating a table asynchronously [message #334855 is a reply to message #334851] |
Tue, 03 March 2009 11:40  |
Eclipse User |
|
|
|
Originally posted by: wegener.cboenospam.com
"Andrei Serea" <andrei.serea@gmail.com> wrote in message
news:32e185bd5fe6d832add0cd42d8e65ed0$1@www.eclipse.org...
> You are right. The only thing I might add is that in the example, syncExec
> is called instead of asyncExec.
> I had no idea one could access the shell and display from a non-ui thread.
> it still doesn't make sense.
You can't access the shell and display from a non-ui thread. The syncExec
method still calls the run method on the Display's UI thread. The
difference between async and sync is the point that the call returns to the
non-ui thread. For asyncExec, the call returns after the runnable is
scheduled on the UI thread. With syncExec, the method schedules the
runnable on the UI thread and then waits for the runnable to complete. This
blocks the non-UI thread until the runnable completes. Both calls involve
two separate threads (assuming that the sync/asyncExec call isn't made from
the UI thread.)
> But now, after digging for a couple of hours into realms, I am quite
> curious. Can anyone point me towards a place where I could read more about
> realms (except the existing snippets and docs from the eclipse site)?
>
> Anywho, thanks a million!!!
>
|
|
|
Powered by
FUDForum. Page generated in 0.04265 seconds