Bug 66439 Copy of Class causes update error in package explorer
RC1 RHEL JDK 1.4.2_02 Motif I have experienced a problem where I copy a java file and paste it into the same package, accepting the default new name (CopyOfClass.java) However, the package view does not list the class, but it does list 2 instances of the last class in the package (note that I am using the hierarchical view). The file is aparently inserted in the correct location, but the name->class mapping is incorrect: clicking on classes that appear before where the new class should be inserted brings up the correct class, but clicking on classes that appear after the inserted class brings up a different class than the one selected. Restarting eclipse causes the problem to go away
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/StructuredViewer.java
protected void handleOpen(SelectionEvent event) {
		Control control = getControl();
		if (control != null && !control.isDisposed()) {
			ISelection selection = getSelection();
			fireOpen(new OpenEvent(this, selection));
		}
	}
	/**
	 * Handles an invalid selection.
	 * <p>
	 * This framework method is called if a model change picked up by a viewer
	 * results in an invalid selection. For instance if an element contained in
	 * the selection has been removed from the viewer, the viewer is free to
	 * either remove the element from the selection or to pick another element
	 * as its new selection. The default implementation of this method calls
	 * <code>updateSelection</code>. Subclasses may override it to implement
	 * a different strategy for picking a new selection when the old selection
	 * becomes invalid.
	 * </p>
	 * 
	 * @param invalidSelection
	 *            the selection before the viewer was updated
	 * @param newSelection
	 *            the selection after the update, or <code>null</code> if none
	 */
	protected void handleInvalidSelection(ISelection invalidSelection,
			ISelection newSelection) {
		updateSelection(newSelection);
		SelectionChangedEvent event = new SelectionChangedEvent(this,
				newSelection);