Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » asyncExec
asyncExec [message #51866] Tue, 16 October 2007 13:24 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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.
Previous Topic:Closing a Dialog automatically
Next Topic:Examples
Goto Forum:
  


Current Time: Fri Dec 27 18:06:12 GMT 2024

Powered by FUDForum. Page generated in 0.03712 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top