void (@NotNull List<String> patterns) { clearList(); DefaultListModel<String> model = (DefaultListModel<String>)myList.getModel(); for (@NlsSafe String pattern : ContainerUtil.sorted(patterns)) { model.addElement(pattern); } ScrollingUtil.ensureSelectionExists(myList); }