Project: JDT
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
Reported: 2002-09-24 11:29:50 | Status: resolved fixed

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.

Files changed in fix:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java