Bug 65868 - [Viewers] TableViewer.remove() / findItem() does not work properly
Summary: [Viewers] TableViewer.remove() / findItem() does not work properly
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P4 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2004-06-05 10:08 EDT by Tobias Weih CLA
Modified: 2019-09-06 15:35 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Weih CLA 2004-06-05 10:08:20 EDT
while ((element = this.table.getTableViewer().getElementAt(0)) != null) {
		this.table.getTableViewer().remove(element);
	}

ends up in a endless-loop
problem is in TableViewer:
	
	private void internalRemove(final Object[] elements) {
		...
		// use remove(int[]) rather than repeated TableItem.dispose() calls
		// to allow SWT to optimize multiple removals
		int[] indices = new int[elements.length];
		int count = 0;
		for (int i = 0; i < elements.length; ++i) {
			Widget w = findItem(elements[i]);
		...          ^ IS NULL!

a convinient thing would be
  TableViewer.removeAll(); and TableViewer.remove(int index); that act as a 
proxy for the methods in Table.
Comment 1 Boris Bokowski CLA 2007-06-20 13:56:25 EDT
Do you have a snippet that demonstrates this problem?
Comment 2 Boris Bokowski CLA 2009-11-26 09:51:32 EST
Hitesh is now responsible for watching bugs in the [Viewers] component area.
Comment 3 Eclipse Webmaster CLA 2019-09-06 15:35:15 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.