Bug 141435 [Viewers] ListViewer without a selection loses scrolled state when refreshed
When the ListViewer does not contain a selection and is refreshed it loses its vertically scrolled to position. This is because AbstractListViewer removes all items and adds them back (it has to) when a refresh occurs. This is remedied in the use cases where there is a selection because the selected item is revealed after the refresh occurs. Without a selection no reveal can occur therefore it loses its position.
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/AbstractListViewer.java
/*******************************************************************************
 * Copyright (c) 2004, 2006 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *     Chris Longfield <clongfield@internap.com> - Fix for Bug 70856
 *     Tom Schindl - fix for bug 157309
 *******************************************************************************/
package org.eclipse.jface.viewers;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.runtime.Assert;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Widget;
/**
 * Abstract base class for viewers that contain lists of items (such as a combo or list).
 * Most of the viewer implementation is in this base class, except for the minimal code that
 * actually communicates with the underlying widget.
 * 
 * @see org.eclipse.jface.viewers.ListViewer
 * @see org.eclipse.jface.viewers.ComboViewer
 * 
 * @since 3.0
 */
public abstract class AbstractListViewer extends StructuredViewer {