/**
   * Creates a new <code>ImplementorsSearchGroup</code>. The group requires that the selection
   * provided by the given selection provider is of type {@link IStructuredSelection}.
   *
   * @param site the site that will own the action group.
   * @param specialSelectionProvider the selection provider used instead of the sites selection
   *     provider.
   * @since 3.4
   */
  public ImplementorsSearchGroup(IWorkbenchSite site, ISelectionProvider specialSelectionProvider) {
    fSite = site;
    fGroupId = IContextMenuConstants.GROUP_SEARCH;

    fFindImplementorsAction = new FindImplementorsAction(site);
    fFindImplementorsAction.setActionDefinitionId(
        IJavaEditorActionDefinitionIds.SEARCH_IMPLEMENTORS_IN_WORKSPACE);

    fFindImplementorsInProjectAction = new FindImplementorsInProjectAction(site);
    fFindImplementorsInProjectAction.setActionDefinitionId(
        IJavaEditorActionDefinitionIds.SEARCH_IMPLEMENTORS_IN_PROJECT);

    fFindImplementorsInWorkingSetAction = new FindImplementorsInWorkingSetAction(site);
    fFindImplementorsInWorkingSetAction.setActionDefinitionId(
        IJavaEditorActionDefinitionIds.SEARCH_IMPLEMENTORS_IN_WORKING_SET);

    // register the actions as selection listeners
    ISelectionProvider provider =
        specialSelectionProvider == null ? fSite.getSelectionProvider() : specialSelectionProvider;
    ISelection selection = provider.getSelection();
    registerAction(fFindImplementorsAction, provider, selection, specialSelectionProvider);
    registerAction(fFindImplementorsInProjectAction, provider, selection, specialSelectionProvider);
    registerAction(
        fFindImplementorsInWorkingSetAction, provider, selection, specialSelectionProvider);
  }
  /**
   * Note: This constructor is for internal use only. Clients should not call this constructor.
   *
   * @param editor the Java editor
   * @noreference This constructor is not intended to be referenced by clients.
   */
  public ImplementorsSearchGroup(JavaEditor editor) {
    fEditor = editor;
    fSite = fEditor.getSite();
    fGroupId = ITextEditorActionConstants.GROUP_FIND;

    fFindImplementorsAction = new FindImplementorsAction(fEditor);
    fFindImplementorsAction.setActionDefinitionId(
        IJavaEditorActionDefinitionIds.SEARCH_IMPLEMENTORS_IN_WORKSPACE);
    fEditor.setAction("SearchImplementorsInWorkspace", fFindImplementorsAction); // $NON-NLS-1$

    fFindImplementorsInProjectAction = new FindImplementorsInProjectAction(fEditor);
    fFindImplementorsInProjectAction.setActionDefinitionId(
        IJavaEditorActionDefinitionIds.SEARCH_IMPLEMENTORS_IN_PROJECT);
    fEditor.setAction(
        "SearchImplementorsInProject", fFindImplementorsInProjectAction); // $NON-NLS-1$

    fFindImplementorsInWorkingSetAction = new FindImplementorsInWorkingSetAction(fEditor);
    fFindImplementorsInWorkingSetAction.setActionDefinitionId(
        IJavaEditorActionDefinitionIds.SEARCH_IMPLEMENTORS_IN_WORKING_SET);
    fEditor.setAction(
        "SearchImplementorsInWorkingSet", fFindImplementorsInWorkingSetAction); // $NON-NLS-1$
  }