use of com.intellij.openapi.vcs.checkin.TodoCheckinHandlerWorker in project intellij-community by JetBrains.
the class CustomChangelistTodosTreeBuilder method findPatternedTodoItems.
private TodoItem[] findPatternedTodoItems(PsiFile file, final TodoFilter todoFilter) {
if (!myIncludedFiles.contains(file))
return EMPTY_ITEMS;
if (myDirtyFileSet.contains(file.getVirtualFile())) {
myMap.remove(file);
final Change change = myChangeListManager.getChange(file.getVirtualFile());
if (change != null) {
final TodoCheckinHandlerWorker worker = new TodoCheckinHandlerWorker(myProject, Collections.singletonList(change), todoFilter, true);
worker.execute();
final List<TodoItem> todoItems = worker.inOneList();
if (todoItems != null && !todoItems.isEmpty()) {
for (TodoItem todoItem : todoItems) {
myMap.putValue(file, todoItem);
}
}
}
}
final Collection<TodoItem> todoItems = myMap.get(file);
return todoItems == null || todoItems.isEmpty() ? EMPTY_ITEMS : todoItems.toArray(new TodoItem[todoItems.size()]);
}
Aggregations