Bug 137640 [CommonNavigator] New java elements not selected in project explorer
3.2 RC1 - show the Project Explorer view - create a Java project - select the project and create a package (e.g. using the toolbar button) - the package is created, but not selected (it does get selected in the Package Explorer) - select the package - create a new class - the class is created, but not selected (works in the PE) In both cases, the selection gets cleared. This results in subsequent package or class creations not knowing which source folder they should apply to. E.g. try creating two packages in a row.
bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/NavigatorContentDescriptorManager.java
import java.util.Map;
import java.util.Set;
import java.util.TreeSet;
import java.util.WeakHashMap;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.WorkbenchException;
import org.eclipse.ui.internal.navigator.NavigatorPlugin;
import org.eclipse.ui.internal.navigator.VisibilityAssistant;
import org.eclipse.ui.internal.navigator.VisibilityAssistant.VisibilityListener;
import org.eclipse.ui.navigator.INavigatorContentDescriptor;
import org.eclipse.ui.plugin.AbstractUIPlugin;
/**
 * <p>
 * <strong>EXPERIMENTAL</strong>. This class or interface has been added as
 * part of a work in progress. There is a guarantee neither that this API will
 * work nor that it will remain the same. Please do not use this API without
 * consulting with the Platform/UI team.
 * </p>
 * 
 * @since 3.2
 */
public class NavigatorContentDescriptorManager {
	private static final NavigatorContentDescriptorManager INSTANCE = new NavigatorContentDescriptorManager();
 
	private final Map firstClassDescriptors = new HashMap();
	private final Map allDescriptors = new HashMap();
	private class EvaluationCache implements VisibilityListener {