Bug 56397 [New Search] Lose sort order
20040326 - 8am build I'm using the flat layout & choose to sort by parent name, but this setting is not propagated to new search views in other perspectives/windows.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchResultPage.java
}
	
	protected TableViewer createTableViewer(Composite parent) {
		return new ProblemTableViewer(parent);
	}
	
	void setSortOrder(int order) {
		fCurrentSortOrder= order;
		StructuredViewer viewer= getViewer();
		((SortingLabelProvider)viewer.getLabelProvider()).setOrder(order);
		if (order == SortingLabelProvider.SHOW_ELEMENT_CONTAINER) {
			viewer.setSorter(new NameSorter());
		} else if (order == SortingLabelProvider.SHOW_PATH) {
			viewer.setSorter(new PathSorter());
		} else
			viewer.setSorter(new ParentSorter());
	}
	public void init(IPageSite site) {
		super.init(site);
		fActionGroup.fillActionBars(site.getActionBars());
	}
	/**
	 * Precondition here: the viewer must be showing a tree with a LevelContentProvider.
	 * @param order
	 */
	void setGrouping(int grouping) {
		fCurrentGrouping= grouping;
		StructuredViewer viewer= getViewer();
		LevelTreeContentProvider cp= (LevelTreeContentProvider) viewer.getContentProvider();
		cp.setLevel(grouping);