Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 327004 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/jface/viewers/AbstractTreeViewer.java (-6 / +15 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2010 IBM Corporation and others.
2
 * Copyright (c) 2000, 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 23-31 Link Here
23
import java.util.LinkedList;
23
import java.util.LinkedList;
24
import java.util.List;
24
import java.util.List;
25
25
26
import org.eclipse.core.runtime.Assert;
27
import org.eclipse.core.runtime.ListenerList;
28
import org.eclipse.jface.util.SafeRunnable;
29
import org.eclipse.swt.SWT;
26
import org.eclipse.swt.SWT;
30
import org.eclipse.swt.custom.BusyIndicator;
27
import org.eclipse.swt.custom.BusyIndicator;
31
import org.eclipse.swt.events.SelectionEvent;
28
import org.eclipse.swt.events.SelectionEvent;
Lines 37-42 Link Here
37
import org.eclipse.swt.widgets.Item;
34
import org.eclipse.swt.widgets.Item;
38
import org.eclipse.swt.widgets.Widget;
35
import org.eclipse.swt.widgets.Widget;
39
36
37
import org.eclipse.core.runtime.Assert;
38
import org.eclipse.core.runtime.ListenerList;
39
40
import org.eclipse.jface.util.SafeRunnable;
41
40
/**
42
/**
41
 * Abstract base implementation for tree-structure-oriented viewers (trees and
43
 * Abstract base implementation for tree-structure-oriented viewers (trees and
42
 * table trees).
44
 * table trees).
Lines 2621-2627 Link Here
2621
			int i = 0;
2623
			int i = 0;
2622
			while (numItemsToDispose > 0 && i < items.length) {
2624
			while (numItemsToDispose > 0 && i < items.length) {
2623
				Object data = items[i].getData();
2625
				Object data = items[i].getData();
2624
				if (data == null || items.length - i <= numItemsToDispose || !children.containsKey(data)) {
2626
				boolean dispose= false;
2627
				if (i >= min) {
2628
					numItemsToDispose--;
2629
					dispose= true;
2630
				} else if (data == null || !children.containsKey(data)) {
2631
					min--;
2632
					dispose= true;
2633
				}
2634
				if (dispose) {
2625
					if (data != null) {
2635
					if (data != null) {
2626
						disassociate(items[i]);
2636
						disassociate(items[i]);
2627
					}
2637
					}
Lines 2632-2638 Link Here
2632
						// positions i through items.length-2
2642
						// positions i through items.length-2
2633
						System.arraycopy(items, i + 1, items, i, items.length - (i+1));
2643
						System.arraycopy(items, i + 1, items, i, items.length - (i+1));
2634
					}
2644
					}
2635
					numItemsToDispose--;
2636
				} else {
2645
				} else {
2637
					i++;
2646
					i++;
2638
				}
2647
				}

Return to bug 327004