FrameworkLibraryVersionFilter (FrameworkSupportConfigurable configurable) { if (configurable instanceof FrameworkSupportWithLibrary) { final FrameworkLibraryVersionFilter filter = configurable.getVersionFilter(); if (filter != null) { return filter; } } return new FrameworkLibraryVersionFilter() { @Override public boolean isAccepted(@NotNull FrameworkLibraryVersion version) { final FrameworkVersion selectedVersion = myConfigurable.getSelectedVersion(); return selectedVersion == null || version.getVersionString().equals(selectedVersion.getVersionName()); } @Override public String toString() { return "FrameworkSupportLibraryVersionFilter(selectedVersion=" + myConfigurable.getSelectedVersion() + ")"; } }; }