use of com.intellij.usages.rules.UsageGroupingRuleEx in project intellij-community by JetBrains.
the class UsageNodeTreeBuilder method appendUsage.
UsageNode appendUsage(@NotNull Usage usage, @NotNull Consumer<Node> edtInsertedUnderQueue, boolean filterDuplicateLines) {
if (!isVisible(usage))
return null;
final boolean dumb = DumbService.isDumb(myProject);
GroupNode groupNode = myRoot;
for (int i = 0; i < myGroupingRules.length; i++) {
UsageGroupingRule rule = myGroupingRules[i];
if (dumb && !DumbService.isDumbAware(rule))
continue;
UsageGroup group = rule instanceof UsageGroupingRuleEx ? ((UsageGroupingRuleEx) rule).groupUsage(usage, myTargets) : rule.groupUsage(usage);
if (group != null) {
groupNode = groupNode.addOrGetGroup(group, i, edtInsertedUnderQueue);
}
}
return groupNode.addUsage(usage, edtInsertedUnderQueue, filterDuplicateLines);
}
Aggregations