void () { List<ShelvedChangeList> shelvedLists = myVcsShelveChangesSaver.getShelvedLists(); if (!shelvedLists.isEmpty()) { Comparator<ShelvedChangeList> nameComparator = Comparator.comparing(it -> it.getDisplayName(), String.CASE_INSENSITIVE_ORDER); List<ShelvedChangeList> sorted = ContainerUtil.sorted(shelvedLists, nameComparator); ShelvedChangesViewManager.getInstance(myProject).activateView(sorted.get(0)); } }