use of com.intellij.ide.actions.ApplyIntentionAction in project intellij-community by JetBrains.
the class GotoActionItemProvider method processIntentions.
private boolean processIntentions(String pattern, Processor<MatchedValue> consumer, DataContext dataContext) {
MinusculeMatcher matcher = NameUtil.buildMatcher("*" + pattern, NameUtil.MatchingCaseSensitivity.NONE);
Map<String, ApplyIntentionAction> intentionMap = myIntentions.getValue();
JBIterable<ActionWrapper> intentions = JBIterable.from(intentionMap.keySet()).transform(intentionText -> {
ApplyIntentionAction intentionAction = intentionMap.get(intentionText);
if (myModel.actionMatches(pattern, matcher, intentionAction) == MatchMode.NONE)
return null;
return new ActionWrapper(intentionAction, intentionText, MatchMode.INTENTION, dataContext);
}).filter(Condition.NOT_NULL);
return processItems(pattern, intentions, consumer);
}
Aggregations