List<JComponent> (JRadioButton button, ModelScopeItem m, Disposable dialogDisposable) { CustomScopeItem model = (CustomScopeItem) m; ScopeChooserCombo scopeCombo = new ScopeChooserCombo(); Disposer.register(dialogDisposable, scopeCombo); scopeCombo.init(model.getProject(), model.getSearchInLibFlag(), true, model.getPreselectedCustomScope(), null); scopeCombo.setCurrentSelection(false); scopeCombo.setEnabled(button.isSelected()); model.setSearchScopeSupplier(() -> scopeCombo.getSelectedScope()); button.addItemListener(e -> scopeCombo.setEnabled(button.isSelected())); ArrayList<JComponent> components = new ArrayList<>(); components.add(scopeCombo); return components; }