| Summary: | [Dialogs] Initial selection problem using ElementListSelectionDialog | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Mark Gaylard <mg> |
| Component: | UI | Assignee: | Tod Creasey <Tod_Creasey> |
| Status: | RESOLVED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 2.1 | ||
| Target Milestone: | 2.1 RC1 | ||
| Hardware: | PC | ||
| OS: | Windows 2000 | ||
| Whiteboard: | |||
|
Description
Mark Gaylard
Moving to Lynne as she is looking at this dialog right now. Please give me an example demonstrating your problem. I am running the current
2.1 build. If I run the following, the items are selected and focus is in the
text field (as expected).
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.dialogs.ElementListSelectionDialog;
/*
* Created on Feb 19, 2003
*
* To change this generated comment go to
* Window>Preferences>Java>Code Generation>Code Template
*/
/**
* @author lynne
*
* To change this generated comment go to
* Window>Preferences>Java>Code Generation>Code Template
*/
public class TestElementSelectionDialog {
public static void main (String [] args) {
Display display = new Display ();
Shell shell = new Shell (display);
ILabelProvider labelProvider = new LabelProvider();
ElementListSelectionDialog dialog = new ElementListSelectionDialog
(shell, labelProvider);
dialog.setIgnoreCase(false);
dialog.setMultipleSelection(true);
dialog.setElements(new String[]
{"a123", "a456", "b789", "a111", "a222"});
dialog.setInitialSelections(new String[] {"a123", "a456", "a111"});
dialog.setFilter("a");
dialog.open();
}
}
There were problems here which have been fixed. Tod, please verify. |