use of com.intellij.psi.search.TodoItem in project intellij-community by JetBrains.
the class PsiTodoSearchHelperImpl method getTodoItemsCount.
@Override
public int getTodoItemsCount(@NotNull PsiFile file, @NotNull TodoPattern pattern) {
int count = TodoCacheManager.SERVICE.getInstance(myManager.getProject()).getTodoCount(file.getVirtualFile(), pattern.getIndexPattern());
if (count != -1)
return count;
TodoItem[] items = findTodoItems(file);
count = 0;
for (TodoItem item : items) {
if (item.getPattern().equals(pattern))
count++;
}
return count;
}
Aggregations