org.eclipse.ui.dialogs.FilteredList Java Examples
The following examples show how to use
org.eclipse.ui.dialogs.FilteredList.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MultiElementListSelectionDialog.java From n4js with Eclipse Public License 1.0 | 5 votes |
/** * {@inheritDoc} */ @Override protected FilteredList createFilteredList(Composite parent) { FilteredList filteredList = super.createFilteredList(parent); if (fComparator != null) { filteredList.setComparator(fComparator); } return filteredList; }
Example #2
Source File: AddImportOnSelectionAction.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
public TypeNameMatch chooseImport(TypeNameMatch[] results, String containerName) { int nResults= results.length; if (nResults == 0) { return null; } else if (nResults == 1) { return results[0]; } if (containerName.length() != 0) { for (int i= 0; i < nResults; i++) { TypeNameMatch curr= results[i]; if (containerName.equals(curr.getTypeContainerName())) { return curr; } } } fIsShowing= true; ElementListSelectionDialog dialog= new ElementListSelectionDialog(fShell, new TypeNameMatchLabelProvider(TypeNameMatchLabelProvider.SHOW_FULLYQUALIFIED)) { @Override protected FilteredList createFilteredList(Composite parent) { FilteredList filteredList= super.createFilteredList(parent); filteredList.setComparator(ADD_IMPORT_COMPARATOR); return filteredList; } }; dialog.setTitle(JavaEditorMessages.AddImportOnSelection_dialog_title); dialog.setMessage(JavaEditorMessages.AddImportOnSelection_dialog_message); dialog.setElements(results); if (dialog.open() == Window.OK) { fIsShowing= false; TypeNameMatch result= (TypeNameMatch) dialog.getFirstResult(); QualifiedTypeNameHistory.remember(result.getFullyQualifiedName()); return result; } fIsShowing= false; return null; }
Example #3
Source File: MultiElementListSelectionDialog.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
/** * {@inheritDoc} */ @Override protected FilteredList createFilteredList(Composite parent) { FilteredList filteredList= super.createFilteredList(parent); if (fComparator != null) { filteredList.setComparator(fComparator); } return filteredList; }