/**
   * Delegates to the helper from the registry.
   *
   * @see #getControl(Composite)
   * @see
   *     org.nightlabs.jfire.base.ui.prop.search.PropertySetSearchFilterItemEditorHelper#getSearchFilterItem()
   */
  @Override
  public ISearchFilterItem getSearchFilterItem() {
    if (helper == null)
      throw new IllegalStateException(
          "SearchItemEditorHelper is null and can not be asked for the SearchFilterItem"); //$NON-NLS-1$

    return helper.getSearchFilterItem();
  }
  /**
   * This searches for the right helper, gets and remembers a new instance of it and the Control it
   * returned.
   *
   * @see
   *     org.nightlabs.jfire.base.ui.prop.search.PropertySetSearchFilterItemEditorHelper#getControl(org.eclipse.swt.widgets.Composite)
   */
  @Override
  public Control getControl(Composite parent) {
    if (helper != null)
      if (helperControl != null && !helperControl.isDisposed()) return helperControl;

    //		PropertySetSearchFilterItemEditorHelperRegistry registry =
    // PropertySetSearchFilterItemEditorHelperRegistry.sharedInstance();
    StructFieldSearchFilterEditorRegistry registry =
        StructFieldSearchFilterEditorRegistry.sharedInstance();
    if (getStructField() == null)
      throw new IllegalStateException(
          "Member personStructField is null. init(personStructField) might not have been called."); //$NON-NLS-1$

    final IStructFieldSearchFilterItemEditor filterItemEditor =
        registry.createSearchFilterItemEditor(getStructField(), null);
    helper =
        new PropertySetStructFieldSearchItemEditorHelper() {
          @Override
          public ISearchFilterItem getSearchFilterItem() {
            return filterItemEditor.getSearchFilterItem();
          }

          @Override
          public Control getControl(Composite parent) {
            return filterItemEditor.createControl(parent, false);
          }

          @Override
          public void close() {}

          public String getInput() {
            return filterItemEditor.getInput();
          };

          public void setInput(String input) {
            filterItemEditor.setInput(input);
          };
        };

    if (helper instanceof PropertySetStructFieldSearchItemEditorHelper)
      ((PropertySetStructFieldSearchItemEditorHelper) helper).init(getStructField());
    helperControl = helper.getControl(parent);
    return helperControl;
  }
 @Override
 public void setInput(String input) {
   if (helper != null) helper.setInput(input);
 }
 @Override
 public String getInput() {
   if (helper != null) return helper.getInput();
   return null;
 }