void () { ApplicationManager.getApplication().invokeLater(() -> { updateTreeIfShown(tree -> { ChangesGroupingSupport treeGroupingSupport = tree.getGroupingSupport(); if (treeGroupingSupport.isAvailable(REPOSITORY_GROUPING) && treeGroupingSupport.get(REPOSITORY_GROUPING)) { tree.onGroupingChanged(); } }); }, myProject.getDisposed()); }