Bug 17470 Lose list contents when searching from Java Browsing
When you search (eg. for references) from a method selected in the method list of java browsing perspective, you lose at a minimum the contents of the method list. This can happen in two ways: 1. The first time you run the search, you lose the project, package, and type list selections, but yet the contents of all these list remain. Note this means that although a package isn't selected, the classes for it are still in the next list. The methods list always ends up empty, however. 2. If you reselect everything and rerun the same search (note you still have the previous same search result in the search results list), you lose all selections as in (1), but the packages, types, and methods list are now all empty. What is odd is that if I simply select an item from the search results list, I don't lose selections or contents, so its not simply autoselection of the search result that's causing the selection/contents change. In fact, it appears that the selection is being changed early in the search process while the progress is still moving and before any results appear.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
setInitialSelection();
		
		
		getViewSite().getWorkbenchWindow().getSelectionService().addSelectionListener(this);
		getViewSite().getPage().addPartListener(fPartListener);
		
		fillActionBars();
		
		setHelp();
	}
	private void initDragAndDrop() {
		int ops= DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
		Transfer[] transfers= new Transfer[] {
			LocalSelectionTransfer.getInstance(), 
			ResourceTransfer.getInstance()};
		
		
		TransferDropTargetListener[] dropListeners= new TransferDropTargetListener[] {
			new SelectionTransferDropAdapter(fViewer)
		};
		fViewer.addDropSupport(ops | DND.DROP_DEFAULT, transfers, new DelegatingDropAdapter(dropListeners));
		
		
		Control control= fViewer.getControl();
		TransferDragSourceListener[] dragListeners= new TransferDragSourceListener[] {
			new SelectionTransferDragAdapter(fViewer),
			new ResourceTransferDragAdapter(fViewer)
		};
		DragSource source= new DragSource(control, ops);