Java 类org.eclipse.ui.dialogs.FilteredList 实例源码
项目:n4js
文件:MultiElementListSelectionDialog.java
/**
* {@inheritDoc}
*/
@Override
protected FilteredList createFilteredList(Composite parent) {
FilteredList filteredList = super.createFilteredList(parent);
if (fComparator != null) {
filteredList.setComparator(fComparator);
}
return filteredList;
}
项目:Eclipse-Postfix-Code-Completion
文件:AddImportOnSelectionAction.java
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;
}
项目:Eclipse-Postfix-Code-Completion
文件:MultiElementListSelectionDialog.java
/**
* {@inheritDoc}
*/
@Override
protected FilteredList createFilteredList(Composite parent) {
FilteredList filteredList= super.createFilteredList(parent);
if (fComparator != null) {
filteredList.setComparator(fComparator);
}
return filteredList;
}
项目:Eclipse-Postfix-Code-Completion-Juno38
文件:AddImportOnSelectionAction.java
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;
}
项目:Eclipse-Postfix-Code-Completion-Juno38
文件:MultiElementListSelectionDialog.java
/**
* {@inheritDoc}
*/
@Override
protected FilteredList createFilteredList(Composite parent) {
FilteredList filteredList= super.createFilteredList(parent);
if (fComparator != null) {
filteredList.setComparator(fComparator);
}
return filteredList;
}
项目:GrayTin
文件:ProjectSelectionDialog.java
protected Control createDialogArea(Composite parent) {
Composite contents = (Composite) super.createDialogArea(parent);
createMessageArea(contents);
createFilterText(contents);
FilteredList createFilteredList = createFilteredList(contents);
createFilteredList.setFilterMatcher(new MatchEveryWhereFilterMatcher());
setListElements(fElements);
setSelection(getInitialElementSelections().toArray());
return contents;
}