@Nullable
  public NamedScope getSelectedScope() {
    final JComponent component = getChildComponent();
    if (component instanceof JComboBox) {
      int idx = ((JComboBox<?>)component).getSelectedIndex();
      if (idx < 0) return null;
      return (NamedScope)((JComboBox<?>)component).getSelectedItem();
    }
    else {
      return (NamedScope)((JBComboBoxTableCellEditorComponent)component).getEditorValue();
    }
  }
@Nullable
  public NamedScope getSelectedScope()