TableCellEditor (final ScopeSetting mapping) { return new AbstractTableCellEditor() { private PackageSetChooserCombo myScopeChooser; @Override @Nullable public Object getCellEditorValue() { return myScopeChooser.getSelectedScope(); } @Override public Component getTableCellEditorComponent(final JTable table, Object value, boolean isSelected, int row, int column) { myScopeChooser = new PackageSetChooserCombo(myProject, value == null ? null : ((NamedScope)value).getScopeId(), false, false){ @Override protected NamedScope[] createModel() { final NamedScope[] model = super.createModel(); final ArrayList<NamedScope> filteredScopes = new ArrayList<>(Arrays.asList(model)); CustomScopesProviderEx.filterNoSettingsScopes(myProject, filteredScopes); return filteredScopes.toArray(NamedScope.EMPTY_ARRAY); } }; ((JBComboBoxTableCellEditorComponent)myScopeChooser.getChildComponent()).setCell(table, row, column); return myScopeChooser; } }; }