use of org.eclipse.search2.internal.ui.MatchFilterAction in project eclipse.platform.text by eclipse.
the class AbstractTextSearchViewPage method addFilterActionsToViewMenu.
private IAction[] addFilterActionsToViewMenu() {
AbstractTextSearchResult input = getInput();
if (input == null) {
return null;
}
MatchFilter[] allMatchFilters = input.getAllMatchFilters();
if (allMatchFilters == null && getElementLimit() == null) {
return null;
}
IActionBars bars = getSite().getActionBars();
IMenuManager menu = bars.getMenuManager();
menu.prependToGroup(IContextMenuConstants.GROUP_FILTERING, new MatchFilterSelectionAction(this));
if (allMatchFilters != null) {
MatchFilterAction[] actions = new MatchFilterAction[allMatchFilters.length];
for (int i = allMatchFilters.length - 1; i >= 0; i--) {
MatchFilterAction filterAction = new MatchFilterAction(this, allMatchFilters[i]);
actions[i] = filterAction;
menu.prependToGroup(IContextMenuConstants.GROUP_FILTERING, filterAction);
}
return actions;
}
return null;
}
Aggregations