Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Viewer is busy
Viewer is busy [message #329776] Thu, 03 July 2008 14:16 Go to next message
David  Pérez is currently offline David PérezFriend
Messages: 228
Registered: July 2009
Senior Member
Hi,

I want to add a new row in my viewer at the end.

So I have this code:

Table tbl = viewer.getTable();
insertIndex = tbl.getItemCount();
viewer.setItemCount(insertIndex+1);
viewer.replace(newRow, insertIndex);


The problem is that it fails in the replace():

!MESSAGE Ignored reentrant call while viewer is busy. This is only logged
once per viewer instance, but similar calls will still be ignored.
java.lang.RuntimeException
at org.eclipse.jface.viewers.ColumnViewer.checkBusy(ColumnViewe r.java:763)
at
org.eclipse.jface.viewers.AbstractTableViewer.replace(Abstra ctTableViewer.java:1040)
at
com.jobisjob.grid.crud.CrudContentProvider.updateElement(Cru dContentProvider.java:273)
at
org.eclipse.jface.viewers.AbstractTableViewer$1.handleEvent( AbstractTableViewer.java:78)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1027)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1012)
at org.eclipse.swt.widgets.Table.checkData(Table.java:928)
at org.eclipse.swt.widgets.Table.checkData(Table.java:917)
at org.eclipse.swt.widgets.TableItem.getImage(TableItem.java:55 0)
at
org.eclipse.jface.viewers.TableViewerRow.setImage(TableViewe rRow.java:132)
at org.eclipse.jface.viewers.ViewerCell.setImage(ViewerCell.jav a:170)
at
org.eclipse.jface.viewers.ColumnLabelProvider.update(ColumnL abelProvider.java:38)
at org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerColumn. java:145)
at
org.eclipse.jface.viewers.AbstractTableViewer.doUpdateItem(A bstractTableViewer.java:386)
at
org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRun nable.run(StructuredViewer.java:466)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:880)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:17 5)
at
org.eclipse.jface.viewers.StructuredViewer.refreshItem(Struc turedViewer.java:1476)
at
org.eclipse.jface.viewers.AbstractTableViewer.replace(Abstra ctTableViewer.java:1043)


I don't understand it.
Any help please?
Re: Viewer is busy [message #329777 is a reply to message #329776] Thu, 03 July 2008 14:17 Go to previous messageGo to next message
David  Pérez is currently offline David PérezFriend
Messages: 228
Registered: July 2009
Senior Member
I forgot to mention that the table is virtual.

David Perez wrote:

> Hi,

> I want to add a new row in my viewer at the end.

> So I have this code:

> Table tbl = viewer.getTable();
> insertIndex = tbl.getItemCount();
> viewer.setItemCount(insertIndex+1);
> viewer.replace(newRow, insertIndex);


> The problem is that it fails in the replace():

> !MESSAGE Ignored reentrant call while viewer is busy. This is only logged
> once per viewer instance, but similar calls will still be ignored.
> java.lang.RuntimeException
> at org.eclipse.jface.viewers.ColumnViewer.checkBusy(ColumnViewe r.java:763)
> at
>
org.eclipse.jface.viewers.AbstractTableViewer.replace(Abstra ctTableViewer.java:1040)
> at
>
com.jobisjob.grid.crud.CrudContentProvider.updateElement(Cru dContentProvider.java:273)
> at
>
org.eclipse.jface.viewers.AbstractTableViewer$1.handleEvent( AbstractTableViewer.java:78)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1027)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1012)
> at org.eclipse.swt.widgets.Table.checkData(Table.java:928)
> at org.eclipse.swt.widgets.Table.checkData(Table.java:917)
> at org.eclipse.swt.widgets.TableItem.getImage(TableItem.java:55 0)
> at
> org.eclipse.jface.viewers.TableViewerRow.setImage(TableViewe rRow.java:132)
> at org.eclipse.jface.viewers.ViewerCell.setImage(ViewerCell.jav a:170)
> at
>
org.eclipse.jface.viewers.ColumnLabelProvider.update(ColumnL abelProvider.java:38)
> at org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerColumn. java:145)
> at
>
org.eclipse.jface.viewers.AbstractTableViewer.doUpdateItem(A bstractTableViewer.java:386)
> at
>
org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRun nable.run(StructuredViewer.java:466)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
> at org.eclipse.core.runtime.Platform.run(Platform.java:880)
> at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48)
> at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:17 5)
> at
>
org.eclipse.jface.viewers.StructuredViewer.refreshItem(Struc turedViewer.java:1476)
> at
>
org.eclipse.jface.viewers.AbstractTableViewer.replace(Abstra ctTableViewer.java:1043)


> I don't understand it.
> Any help please?
Re: Viewer is busy [message #329782 is a reply to message #329777] Thu, 03 July 2008 15:41 Go to previous messageGo to next message
David  Pérez is currently offline David PérezFriend
Messages: 228
Registered: July 2009
Senior Member
Calling viewer.add(newRow) doesn't show this problem. :-)

David Perez wrote:

> I forgot to mention that the table is virtual.

> David Perez wrote:

>> Hi,

>> I want to add a new row in my viewer at the end.

>> So I have this code:

>> Table tbl = viewer.getTable();
>> insertIndex = tbl.getItemCount();
>> viewer.setItemCount(insertIndex+1);
>> viewer.replace(newRow, insertIndex);


>> The problem is that it fails in the replace():

>> !MESSAGE Ignored reentrant call while viewer is busy. This is only logged
>> once per viewer instance, but similar calls will still be ignored.
>> java.lang.RuntimeException
>> at org.eclipse.jface.viewers.ColumnViewer.checkBusy(ColumnViewe r.java:763)
>> at
>>
>
org.eclipse.jface.viewers.AbstractTableViewer.replace(Abstra ctTableViewer.java:1040)
>> at
>>
>
com.jobisjob.grid.crud.CrudContentProvider.updateElement(Cru dContentProvider.java:273)
>> at
>>
>
org.eclipse.jface.viewers.AbstractTableViewer$1.handleEvent( AbstractTableViewer.java:78)
>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1027)
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1012)
>> at org.eclipse.swt.widgets.Table.checkData(Table.java:928)
>> at org.eclipse.swt.widgets.Table.checkData(Table.java:917)
>> at org.eclipse.swt.widgets.TableItem.getImage(TableItem.java:55 0)
>> at
>> org.eclipse.jface.viewers.TableViewerRow.setImage(TableViewe rRow.java:132)
>> at org.eclipse.jface.viewers.ViewerCell.setImage(ViewerCell.jav a:170)
>> at
>>
>
org.eclipse.jface.viewers.ColumnLabelProvider.update(ColumnL abelProvider.java:38)
>> at org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerColumn. java:145)
>> at
>>
>
org.eclipse.jface.viewers.AbstractTableViewer.doUpdateItem(A bstractTableViewer.java:386)
>> at
>>
>
org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRun nable.run(StructuredViewer.java:466)
>> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
>> at org.eclipse.core.runtime.Platform.run(Platform.java:880)
>> at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48)
>> at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:17 5)
>> at
>>
>
org.eclipse.jface.viewers.StructuredViewer.refreshItem(Struc turedViewer.java:1476)
>> at
>>
>
org.eclipse.jface.viewers.AbstractTableViewer.replace(Abstra ctTableViewer.java:1043)


>> I don't understand it.
>> Any help please?
Re: Viewer is busy [message #329786 is a reply to message #329782] Thu, 03 July 2008 17:35 Go to previous messageGo to next message
David  Pérez is currently offline David PérezFriend
Messages: 228
Registered: July 2009
Senior Member
The problem with this alternative is that the viewer isn't updated.
Any hint from viewer gurus please...

David Perez wrote:

> Calling viewer.add(newRow) doesn't show this problem. :-)

> David Perez wrote:

>> I forgot to mention that the table is virtual.
Re: Viewer is busy [message #329808 is a reply to message #329776] Sat, 05 July 2008 20:08 Go to previous messageGo to next message
Boris Bokowski is currently offline Boris BokowskiFriend
Messages: 272
Registered: July 2009
Senior Member
Could you please file a bug for this, ideally with a snippet with which we
can reproduce the problem?

Thanks
Boris

"David Perez" <craquerpro@yahoo.es> wrote in message
news:22a787081cd5d4a1c21ef40b28bd13bc$1@www.eclipse.org...
> Hi,
>
> I want to add a new row in my viewer at the end.
>
> So I have this code:
>
> Table tbl = viewer.getTable();
> insertIndex = tbl.getItemCount();
> viewer.setItemCount(insertIndex+1);
> viewer.replace(newRow, insertIndex);
>
>
> The problem is that it fails in the replace():
>
> !MESSAGE Ignored reentrant call while viewer is busy. This is only logged
> once per viewer instance, but similar calls will still be ignored.
> java.lang.RuntimeException
> at org.eclipse.jface.viewers.ColumnViewer.checkBusy(ColumnViewe r.java:763)
> at
> org.eclipse.jface.viewers.AbstractTableViewer.replace(Abstra ctTableViewer.java:1040)
> at
> com.jobisjob.grid.crud.CrudContentProvider.updateElement(Cru dContentProvider.java:273)
> at
> org.eclipse.jface.viewers.AbstractTableViewer$1.handleEvent( AbstractTableViewer.java:78)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1027)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1012)
> at org.eclipse.swt.widgets.Table.checkData(Table.java:928)
> at org.eclipse.swt.widgets.Table.checkData(Table.java:917)
> at org.eclipse.swt.widgets.TableItem.getImage(TableItem.java:55 0)
> at
> org.eclipse.jface.viewers.TableViewerRow.setImage(TableViewe rRow.java:132)
> at org.eclipse.jface.viewers.ViewerCell.setImage(ViewerCell.jav a:170)
> at
> org.eclipse.jface.viewers.ColumnLabelProvider.update(ColumnL abelProvider.java:38)
> at org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerColumn. java:145)
> at
> org.eclipse.jface.viewers.AbstractTableViewer.doUpdateItem(A bstractTableViewer.java:386)
> at
> org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRun nable.run(StructuredViewer.java:466)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
> at org.eclipse.core.runtime.Platform.run(Platform.java:880)
> at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48)
> at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:17 5)
> at
> org.eclipse.jface.viewers.StructuredViewer.refreshItem(Struc turedViewer.java:1476)
> at
> org.eclipse.jface.viewers.AbstractTableViewer.replace(Abstra ctTableViewer.java:1043)
>
>
> I don't understand it.
> Any help please?
>
Re: Viewer is busy [message #329819 is a reply to message #329808] Mon, 07 July 2008 10:00 Go to previous messageGo to next message
David  Pérez is currently offline David PérezFriend
Messages: 228
Registered: July 2009
Senior Member
Thanks Boris for your interest, I think I have solved it.
I have rewritten my code, and I don't have this problem anymore. :-)

Boris Bokowski wrote:

> Could you please file a bug for this, ideally with a snippet with which we
> can reproduce the problem?

> Thanks
> Boris
Re: Viewer is busy [message #329889 is a reply to message #329819] Wed, 09 July 2008 14:37 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: automatic.javalobby.org

I have run into the same problem with the replace(element, index) method on AbstractTableViewer. Can you post your work around here?

Thanks,
Scott
Re: Viewer is busy [message #329934 is a reply to message #329889] Thu, 10 July 2008 19:40 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Please please post a bug report with a reproduceable test case!!!!!!

Tom

Scott Gager schrieb:
> I have run into the same problem with the replace(element, index) method on AbstractTableViewer. Can you post your work around here?
>
> Thanks,
> Scott


--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Previous Topic:Re: ShowInMenu
Next Topic:Pre-populating External Tools
Goto Forum:
  


Current Time: Fri Nov 08 22:07:54 GMT 2024

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

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

Back to the top