Bug 270457 [Viewers] [regression] CheckBoxTreeViewer clears check state after collapseAll
Hi there :) In my RCP I've a CheckBoxTreeViewer that looses check states for invisible items. Turns out if a disable the collapseAll() call things go back to normal. So, in a tree like this: [x] root [x] sub a collapseAll expandAll will create this: [x] root [] sub Could still be my fault, feel free to have me try some workarounds or other tests that help you find the cause...
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/AbstractTreeViewer.java
internalRefresh(element);
						
						continue elementloop;
					}
					insertionIndexInItems++;
				}
				
				if (insertionIndexInItems == items.length) {
					createTreeItem(widget, element, -1);
					newItems++;
				} else {
					
					
					
					createTreeItem(widget, element, insertionIndexInItems + newItems);
					newItems++;
				}
			}
		}
	}
	/**
	 * See if element is the data of one of the elements in items.
	 *
	 * @param items
	 * @param element
	 * @return <code>true</code> if the element matches.
	 */
	private boolean itemExists(Item[] items, Object element) {