Commit 3a5ceeac authored by Nikita.Lyubimov's avatar Nikita.Lyubimov Committed by intellij-monorepo-bot
Browse files

[RIDER] Fix high cpu usage in todo explorer (fix RIDER-103172)

(cherry picked from commit 758edf5adf7b604e03a1446f6cf8a46dead3aa09)

IJ-CR-129379

GitOrigin-RevId: c87458c5d1b6f79ab5aab5340c94691377413f01
parent eb52cbe6
Showing with 12 additions and 0 deletions
+12 -0
...@@ -17,6 +17,7 @@ import com.intellij.openapi.progress.ProcessCanceledException; ...@@ -17,6 +17,7 @@ import com.intellij.openapi.progress.ProcessCanceledException;
import com.intellij.openapi.project.Project; import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Disposer; import com.intellij.openapi.util.Disposer;
import com.intellij.openapi.util.NlsContexts; import com.intellij.openapi.util.NlsContexts;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.openapi.wm.ToolWindow; import com.intellij.openapi.wm.ToolWindow;
import com.intellij.openapi.wm.ToolWindowManager; import com.intellij.openapi.wm.ToolWindowManager;
import com.intellij.openapi.wm.ex.ToolWindowEx; import com.intellij.openapi.wm.ex.ToolWindowEx;
...@@ -266,6 +267,17 @@ public class TodoView implements PersistentStateComponent<TodoView.State>, Dispo ...@@ -266,6 +267,17 @@ public class TodoView implements PersistentStateComponent<TodoView.State>, Dispo
} }
} }
public final void refresh(@NotNull List<VirtualFile> files) {
if (myAllTodos == null) {
return;
}
myPanels.stream()
.map(TodoPanel::getTreeBuilder)
.map(TodoTreeBuilder::getCoroutineHelper)
.forEach(x -> x.scheduleMarkFilesAsDirtyAndUpdateTree(files));
}
@VisibleForTesting @VisibleForTesting
public final @NotNull CompletableFuture<Void> refresh() { public final @NotNull CompletableFuture<Void> refresh() {
if (myAllTodos == null) { if (myAllTodos == null) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment