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
This commit is contained in:
Konstantin Kolosovsky
2019-07-02 06:52:16 +03:00
committed by intellij-monorepo-bot
parent e15afc8c96
commit ebba4bd9ea
@@ -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`.
* <p>
* No listener supposed to be called
*/
public void setIncludedChanges(@NotNull Collection<?> changes) {
myIncludedChanges.clear();
myIncludedChanges.addAll(changes);
notifyInclusionListener();
repaint();
}