asyncExec [message #51866] |
Tue, 16 October 2007 13:24 |
Eclipse User |
|
|
|
Originally posted by: sku.highex.se
Hi,
I'm working on simple monitoring app that has view with tableviewer which
updated (actually rows just inserted) from background thread. The thread
receives data and try to execute following code in the view class:
public void TableRowInserted(TableRow tr) {
final TableRow tr1 = tr;
getViewSite().getWorkbenchWindow().getShell().getDisplay().a syncExec(new
Runnable() {
public void run() {
tableViewer.add(tr1);
}
});
}
But really nothing displayed in the tableviewer untill I click anywhere in
workspace or execute any action or open other view - it seems like asyncExec
is waiting for any user input. Is there some workaround? By the way - in RCP
application it works fine.
Regards,
Sergey.
|
|
|
Re: asyncExec [message #51992 is a reply to message #51866] |
Tue, 16 October 2007 18:18 |
Eclipse User |
|
|
|
Originally posted by: jkrause.innoopract.com
Have a look here:
http://www.eclipse.org/rap/noteworthy/
and search for "Apartment Threading"
You need to enable data push, normally data is only pulled.
Jochen
Sergey Kuznetsov wrote:
> Hi,
>
> I'm working on simple monitoring app that has view with tableviewer
> which updated (actually rows just inserted) from background thread. The
> thread receives data and try to execute following code in the view class:
>
> public void TableRowInserted(TableRow tr) {
> final TableRow tr1 = tr;
> getViewSite().getWorkbenchWindow().getShell().getDisplay().a syncExec(new
> Runnable() {
> public void run() {
> tableViewer.add(tr1);
> }
> });
> }
>
> But really nothing displayed in the tableviewer untill I click anywhere
> in workspace or execute any action or open other view - it seems like
> asyncExec is waiting for any user input. Is there some workaround? By
> the way - in RCP application it works fine.
>
> Regards,
> Sergey.
|
|
|
Re: asyncExec [message #52094 is a reply to message #51992] |
Tue, 16 October 2007 21:55 |
Eclipse User |
|
|
|
Originally posted by: kser.cma.ru
Thanks! Exactly what I need.
"Jochen Krause" <jkrause@innoopract.com> wrote in message
news:ff2ve5$6h8$1@build.eclipse.org...
> Have a look here:
>
> http://www.eclipse.org/rap/noteworthy/
>
> and search for "Apartment Threading"
>
> You need to enable data push, normally data is only pulled.
>
> Jochen
>
> Sergey Kuznetsov wrote:
>> Hi,
>>
>> I'm working on simple monitoring app that has view with tableviewer which
>> updated (actually rows just inserted) from background thread. The thread
>> receives data and try to execute following code in the view class:
>>
>> public void TableRowInserted(TableRow tr) {
>> final TableRow tr1 = tr;
>> getViewSite().getWorkbenchWindow().getShell().getDisplay().a syncExec(new
>> Runnable() {
>> public void run() {
>> tableViewer.add(tr1);
>> }
>> });
>> }
>>
>> But really nothing displayed in the tableviewer untill I click anywhere
>> in workspace or execute any action or open other view - it seems like
>> asyncExec is waiting for any user input. Is there some workaround? By the
>> way - in RCP application it works fine.
>>
>> Regards,
>> Sergey.
|
|
|
Powered by
FUDForum. Page generated in 0.03712 seconds