From ebba4bd9ea4b381548636b3df9d1551329d104a3 Mon Sep 17 00:00:00 2001 From: Konstantin Kolosovsky Date: Thu, 13 Jun 2019 21:57:16 +0300 Subject: [PATCH] vcs: Refactor "ChangesTree.setIncludedChanges()" - call inclusion listener I've checked usages, inclusion listeners: * do not call "setIncludedChanges()" inside * do not have complex/performance-critical logic that can be affected by additional listener call So the change should be safe. GitOrigin-RevId: 639e50d56d83ff1372f5ca2ff5caa7d3568381b7 --- .../com/intellij/openapi/vcs/changes/ui/ChangesTree.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesTree.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesTree.java index 974027afc806..0bb177410917 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesTree.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesTree.java @@ -497,16 +497,10 @@ public abstract class ChangesTree extends Tree implements DataProvider { myIncludedChanges.addAll(oldInclusion); } - /** - * Usually, this method should be called before tree is initialized via `rebuildTree` - * to set nodes, that are included "by default". - * This will allow to preselect first included node via `resetTreeState`. - *

- * No listener supposed to be called - */ public void setIncludedChanges(@NotNull Collection changes) { myIncludedChanges.clear(); myIncludedChanges.addAll(changes); + notifyInclusionListener(); repaint(); }