Bug 30751 [Viewers] Closing all projects doesnt clear package browser list [browsing]
In the java browsing perspective, if you close all projects, the packages browser still has a list of all the packages from the last opened project.
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/StructuredViewer.java
* </p>
 * 
 * @param l list of selected elements (element type: <code>Object</code>)
 *   or <code>null</code> if the selection is to be cleared
 * @param reveal <code>true</code> if the selection is to be made
 *   visible, and <code>false</code> otherwise
 */
protected abstract void setSelectionToWidget(List l, boolean reveal);
/**
 * Converts the selection to a <code>List</code> and calls <code>setSelectionToWidget(List, boolean)</code>.
 * The selection is expected to be an <code>IStructuredSelection</code> of elements.
 * If not, the selection is cleared.
 * <p>
 * Subclasses do not typically override this method, but implement <code>setSelectionToWidget(List, boolean)</code> instead.
 *
 * @param selection an IStructuredSelection of elements
 * @param reveal <code>true</code> to reveal the first element in the selection, or <code>false</code> otherwise
 */
protected void setSelectionToWidget(ISelection selection, boolean reveal) {
	if (selection instanceof IStructuredSelection)
		setSelectionToWidget(((IStructuredSelection) selection).toList(), reveal);
	else
		setSelectionToWidget((List) null, reveal);
}
/**
 * Sets this viewer's sorter and triggers refiltering and resorting
 * of this viewer's element. Passing <code>null</code> turns sorting off.
 *
 * @param sorter a viewer sorter, or <code>null</code> if none
 */