Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Best way of removing data from a virtual TableViewer
Best way of removing data from a virtual TableViewer [message #330712] Mon, 11 August 2008 14:03 Go to next message
David  Pérez is currently offline David PérezFriend
Messages: 228
Registered: July 2009
Senior Member
Hi,

I have a TableViewer based on a SWT.VIRTUAL table, and need to remove an
object from the viewer.

What I do is:

1) remove stuff from my custom content provider
2) notify the viewer: myViewer.remove(selectedObject)

But it doesn't always refresh ok the data.

I have tried also this:

1) notify the viewer: myViewer.remove(selectedObject)
2) remove stuff from my custom content provider

and this:

1) remove stuff from my custom content provider
2) notify the table: myViewer.getTable().remove(selectedObjectIndex)

and this:

1) notify the table: myViewer.getTable().remove(selectedObjectIndex)
2) remove stuff from my custom content provider

all of them unsuccessfully. :-(

What's the right way of do it.
Thanks in advance for any help.
Re: Best way of removing data from a virtual TableViewer [message #330713 is a reply to message #330712] Mon, 11 August 2008 14:26 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Hi,

This is a know issue.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=144280
https://bugs.eclipse.org/bugs/show_bug.cgi?id=235983

Never directly interface with the control this will break everything!

Tom

David Perez schrieb:
> Hi,
>
> I have a TableViewer based on a SWT.VIRTUAL table, and need to remove an
> object from the viewer.
>
> What I do is:
>
> 1) remove stuff from my custom content provider
> 2) notify the viewer: myViewer.remove(selectedObject)
>
> But it doesn't always refresh ok the data.
>
> I have tried also this:
>
> 1) notify the viewer: myViewer.remove(selectedObject)
> 2) remove stuff from my custom content provider
>
> and this:
>
> 1) remove stuff from my custom content provider
> 2) notify the table: myViewer.getTable().remove(selectedObjectIndex)
>
> and this:
>
> 1) notify the table: myViewer.getTable().remove(selectedObjectIndex)
> 2) remove stuff from my custom content provider
>
> all of them unsuccessfully. :-(
>
> What's the right way of do it.
> Thanks in advance for any help.
>


--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Re: Best way of removing data from a virtual TableViewer [message #330790 is a reply to message #330713] Wed, 13 August 2008 14:03 Go to previous message
David  Pérez is currently offline David PérezFriend
Messages: 228
Registered: July 2009
Senior Member
Thanks Tom!
Let's hope it gets fixed not too late.
The TableViewer is a very basic component, used everywhere.

Tom Schindl wrote:

> Hi,

> This is a know issue.

> https://bugs.eclipse.org/bugs/show_bug.cgi?id=144280
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=235983

> Never directly interface with the control this will break everything!

> Tom

> David Perez schrieb:
>> Hi,
>>
>> I have a TableViewer based on a SWT.VIRTUAL table, and need to remove an
>> object from the viewer.
>>
>> What I do is:
>>
>> 1) remove stuff from my custom content provider
>> 2) notify the viewer: myViewer.remove(selectedObject)
>>
>> But it doesn't always refresh ok the data.
>>
>> I have tried also this:
>>
>> 1) notify the viewer: myViewer.remove(selectedObject)
>> 2) remove stuff from my custom content provider
>>
>> and this:
>>
>> 1) remove stuff from my custom content provider
>> 2) notify the table: myViewer.getTable().remove(selectedObjectIndex)
>>
>> and this:
>>
>> 1) notify the table: myViewer.getTable().remove(selectedObjectIndex)
>> 2) remove stuff from my custom content provider
>>
>> all of them unsuccessfully. :-(
>>
>> What's the right way of do it.
>> Thanks in advance for any help.
Previous Topic:Re: Message Dialog default focus button
Next Topic:Trouble with Jobs after multiple calls to PlatformUI.createAndRunWorkbench
Goto Forum:
  


Current Time: Sat Nov 09 23:12:25 GMT 2024

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

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

Back to the top