DefaultTreeModel (@NotNull List<ShelvedChangeList> changeLists, @NotNull ChangesGroupingPolicyFactory grouping) { boolean showRecycled = ShelveChangesManager.getInstance(myProject).isShowRecycled(); MyShelvedTreeModelBuilder modelBuilder = new MyShelvedTreeModelBuilder(myProject, grouping); modelBuilder.setShelvedLists(filter(changeLists, l -> !l.isDeleted() && (showRecycled || !l.isRecycled()))); modelBuilder.setDeletedShelvedLists(filter(changeLists, ShelvedChangeList::isDeleted)); return modelBuilder.build(); }