mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
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:
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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user