Bug 24040 JavaBrowsingPerspective - the packages/types and members view clear selection and then contents when an IStructuredSelection event is fired that isn't an IJavaElement
We have an editor in WebSphere Studio that is able to be opened on a .java source file. In this editor the user can select objects. When this occurs in the Java Browsing Perspective the packages/types and members views are cleared out of their contents. It would be nicer if the views weren't clear out. The reason the views are cleared is codein org.eclipse.jdt.internal.ui.browsing.JavaBrowsingPart. This listens to selection and if the selection is an IStructuredSelection ( which our editorpart signals ) it first de-selects the selected items in the editor and then clears the editor contents. If the selection is an IStructuredSelection and the items implement IAdapter but don't return an IJavaElement then the behavior should be the same as for a TextSelectionEvent which the Java Editor fires right now as the user selects text and doesn't reset the viewers' contents to null.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
}
		
		if (selection == null || selection.isEmpty())
			selection= restoreSelectionState(fMemento);
			
		if (selection != null && !selection.isEmpty())
			input= getSingleElementFromSelection(selection);
		else {
			
			input= getSite().getPage().getInput();
			if (!(input instanceof IJavaElement)) {
				if (input instanceof IAdaptable)
					input= ((IAdaptable)input).getAdapter(IJavaElement.class);
				else
					return;
			}
		}
		if (findElementToSelect((IJavaElement)input) != null)
			adjustInputAndSetSelection((IJavaElement)input);
	}
	final protected void setHelp() {
		JavaUIHelp.setHelp(fViewer, getHelpContextId());
	}
	/**
	 * Returns the context ID for the Help system
	 * 
	 * @return	the string used as ID for the Help context
	 */
	abstract protected String getHelpContextId();
	/**