void (@NotNull Collection<? extends T> schemes, Predicate<? super T> filter) { for (T scheme : schemes) { if (filter.test(scheme)) { if (firstProjectScheme == null && isProjectScheme(scheme)) firstProjectScheme = scheme; if (firstIDEScheme == null && !isProjectScheme(scheme)) firstIDEScheme = scheme; ((DefaultComboBoxModel<MySchemeListItem<T>>) getModel()).addElement(new MySchemeListItem<>(scheme)); } } }