Predictive Input Dialogs

DrJava uses "predictive input dialogs" in several places, e.g. in the "Go to File" and "Open Java API Javadoc" features. This type of dialog presents you a list of candidates and allows you to quickly select one of them based on its name.

The top portion of the dialog displays a list of candidates that match your current choice. The text field below allows you to enter text to narrow down the list. On the bottom, there is an "OK" button to accept the current selection, a "Cancel" button to leave the dialog, and a drop-down box to choose the way candidates are selected. Matching is always done case-insensitively.

Fragments. With this matching strategy, you can enter word fragments separated by spaces, and the list will display all the items that contain all the fragments. Example: If you enter "foo bar", the items "FooBar" and "SomeFooMooBar" will be displayed, but "Foo" or "FumBar" will not.

Prefix. With this strategy, only items that begin with the text entered will be displayed in the list. If you enter "foo", the items "Foo" and "FooBar" will be displayed, but "BarFoo" will not.

RegEx. This matching strategy allows you to enter Perl-style regular expressions (as implemented by the java.util.regex package), and the list will contain all the items that match the regular expression. As an example, the regular expression ".*" will display all items, while "[a-m].*" will display all that begin with the letters 'A' through 'M'.