Bug 12283 exception in organize import dialog
20020321++ i pressed 'next' in the dialog that shows up on organize imports java.lang.ArrayIndexOutOfBoundsException: 2 at org.eclipse.jdt.internal.ui.dialogs.FilteredList.getSelection (FilteredList.java:337) at org.eclipse.jdt.internal.ui.dialogs.AbstractElementListSelectionDialog.getSelect edElements(AbstractElementListSelectionDialog.java:222) at org.eclipse.jdt.internal.ui.dialogs.AbstractElementListSelectionDialog.validateC urrentSelection(AbstractElementListSelectionDialog.java:270) at org.eclipse.jdt.internal.ui.dialogs.MultiElementListSelectionDialog.turnPage (MultiElementListSelectionDialog.java:240) at org.eclipse.jdt.internal.ui.dialogs.MultiElementListSelectionDialog.buttonPresse d(MultiElementListSelectionDialog.java:170) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:363) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java (Compiled Code)) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:525) at org.eclipse.jdt.internal.ui.dialogs.AbstractElementListSelectionDialog.access$su perOpen(AbstractElementListSelectionDialog.java:400) at org.eclipse.jdt.internal.ui.dialogs.AbstractElementListSelectionDialog.access$2 (AbstractElementListSelectionDialog.java:399) at org.eclipse.jdt.internal.ui.dialogs.AbstractElementListSelectionDialog$4.run (AbstractElementListSelectionDialog.java:393) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java (Compiled Code)) at org.eclipse.jdt.internal.ui.dialogs.AbstractElementListSelectionDialog.open (AbstractElementListSelectionDialog.java:391) at org.eclipse.jdt.internal.ui.dialogs.MultiElementListSelectionDialog.open (MultiElementListSelectionDialog.java:99) at org.eclipse.jdt.internal.ui.javaeditor.OrganizeImportsAction.doChooseImports (OrganizeImportsAction.java:123) at org.eclipse.jdt.internal.ui.javaeditor.OrganizeImportsAction.access$0 (OrganizeImportsAction.java:107) at org.eclipse.jdt.internal.ui.javaeditor.OrganizeImportsAction$1.chooseImports (OrganizeImportsAction.java:102) at org.eclipse.jdt.internal.corext.codemanipulation.OrganizeImportsOperation.run (OrganizeImportsOperation.java:355) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1338) at org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter.run (WorkbenchRunnableAdapter.java:32) at org.eclipse.jdt.internal.ui.util.BusyIndicatorRunnableContext$BusyRunnable.inter nalRun(BusyIndicatorRunnableContext.java:107) at org.eclipse.jdt.internal.ui.util.BusyIndicatorRunnableContext$BusyRunnable.run (BusyIndicatorRunnableContext.java:74) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java (Compiled Code)) at org.eclipse.jdt.internal.ui.util.BusyIndicatorRunnableContext.run (BusyIndicatorRunnableContext.java:120) at org.eclipse.jdt.internal.ui.javaeditor.OrganizeImportsAction.run (OrganizeImportsAction.java:79) at org.eclipse.ui.texteditor.RetargetTextEditorAction.run (RetargetTextEditorAction.java:103) at org.eclipse.jface.action.Action.runWithEvent(Action.java:473) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:705) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:196) at org.eclipse.core.launcher.Main.run(Main.java:555) at org.eclipse.core.launcher.Main.main(Main.java:396)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/AbstractElementListSelectionDialog.java
/*
 * (c) Copyright IBM Corp. 2000, 2001.
 * All Rights Reserved.
 */
package org.eclipse.jdt.internal.ui.dialogs;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.BusyIndicator;
import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.events.KeyListener;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.util.Assert;
import org.eclipse.jface.viewers.ILabelProvider;
/**
 * An abstract class to select elements out of a list of elements.
 */
public abstract class AbstractElementListSelectionDialog extends SelectionStatusDialog {