Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 342596 - After Tableviewer#remove(Object) refresh brings back the removed object
Summary: After Tableviewer#remove(Object) refresh brings back the removed object
Status: CLOSED INVALID
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6.2   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-12 11:27 EDT by Artur Kronenberg CLA
Modified: 2011-04-12 11:35 EDT (History)
1 user (show)

See Also:


Attachments
RCP project with tableviewer and remove functionality (20.75 KB, application/zip)
2011-04-12 11:27 EDT, Artur Kronenberg CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Artur Kronenberg CLA 2011-04-12 11:27:20 EDT
Created attachment 193057 [details]
RCP project with tableviewer and remove functionality

Hi,

When using JFace TableViewer and calling TableViewer#remove on an object in the viewer, the object is removed from the view.

However, when calling refresh, the removed objects reappear in the view.

I guess this is a bug. If I am mistaken, how can I remove objects permanently? (preferably without resetting the whole input on my viewer)

I ran into that problem when using Comparators on my viewer. I resorted the input by calling refresh on my viewer and saw my deleted items reappear. 

I created a small RCP project with a view and a remove button to show the problem. 

If you'd like to reproduce it by yourself, you can create a TableViewer and simply call TableViewer#remove(object) and TableViewer#refresh(). 

Kind regards,

-- artur
Comment 1 Thomas Schindl CLA 2011-04-12 11:35:17 EDT
No. TableViewer#remove() does not remove it from the input. You also have to remove it from your input-Instance.