Bug 77404 [Navigator] ArrayStoreException thrown by NavigatorDropAdapter.getSelecetdResources
I20041101 Select a method in the Outline view Drag it over the Navigator view NavigatorDropAdapter.getSelectedResources throws the following exception (which is currently quitely eaten by the SWT DND mechanism but in the very near future this exception will be thrown): java.lang.ArrayStoreException at java.util.AbstractCollection.toArray(AbstractCollection.java:174) at org.eclipse.ui.views.navigator.NavigatorDropAdapter.getSelectedResources (NavigatorDropAdapter.java:136) at org.eclipse.ui.views.navigator.NavigatorDropAdapter.validateTarget (NavigatorDropAdapter.java:379) at org.eclipse.ui.views.navigator.NavigatorDropAdapter.validateDrop (NavigatorDropAdapter.java:355) at org.eclipse.jface.viewers.ViewerDropAdapter.doDropValidation (ViewerDropAdapter.java:169) at org.eclipse.jface.viewers.ViewerDropAdapter.dragOver (ViewerDropAdapter.java:215) at org.eclipse.swt.dnd.DNDListener.handleEvent(DNDListener.java:59) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:800) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:824) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:809) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:617) at org.eclipse.swt.dnd.DropTarget.notifyListeners(DropTarget.java:511) at org.eclipse.swt.dnd.DropTarget.DragOver(DropTarget.java:338) at org.eclipse.swt.dnd.DropTarget.access$5(DropTarget.java:314) at org.eclipse.swt.dnd.DropTarget$3.method4(DropTarget.java:234) at org.eclipse.swt.internal.ole.win32.COMObject.callback4(COMObject.java:97) at org.eclipse.swt.internal.ole.win32.COM.DoDragDrop(Native Method) at org.eclipse.swt.dnd.DragSource.drag(DragSource.java:287) at org.eclipse.swt.dnd.DragSource.access$0(DragSource.java:267) at org.eclipse.swt.dnd.DragSource$1.handleEvent(DragSource.java:161) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:800) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2794) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2448) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1527) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1498) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:276) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:144) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:102) at org.eclipse.core.internal.runtime.PlatformActivator$1.run (PlatformActivator.java:335) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:273) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:129) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:185) at org.eclipse.core.launcher.Main.run(Main.java:704) at org.eclipse.core.launcher.Main.main(Main.java:688)
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/NavigatorDropAdapter.java
}
    /**
     * Adds the given status to the list of problems.  Discards
     * OK statuses.  If the status is a multi-status, only its children
     * are added.
     */
    private void mergeStatus(MultiStatus status, IStatus toMerge) {
        if (!toMerge.isOK()) {
            status.merge(toMerge);
        }
    }
    /**
     * Returns an status indicating success.
     */
    private IStatus ok() {
        return new Status(Status.OK, PlatformUI.PLUGIN_ID, 0,
                ResourceNavigatorMessages.getString("DropAdapter.ok"), null); 
    }
    /**
     * Opens an error dialog if necessary.  Takes care of
     * complex rules necessary for making the error dialog look nice.
     */
    private void openError(IStatus status) {
        if (status == null)
            return;
        String genericTitle = ResourceNavigatorMessages
                .getString("DropAdapter.title"); 
        int codes = IStatus.ERROR | IStatus.WARNING;
        
        if (!status.isMultiStatus()) {