/** Returns a menu with a 'repeat search' and 'repeat search no clear' action. */
  protected final JMenu createSearchAgainMenu(SearchResultDataLine line) {
    JMenu menu = new SkinMenu(I18n.tr("Search More"));
    menu.add(new SkinMenuItem(new RepeatSearchAction()));

    if (line == null) {
      menu.setEnabled(isRepeatSearchEnabled());
      return menu;
    }

    menu.addSeparator();
    String keywords = QueryUtils.createQueryString(line.getFilename());
    SearchInformation info =
        SearchInformation.createKeywordSearch(keywords, null, MediaType.getAnyTypeMediaType());
    if (SearchMediator.validateInfo(info) == SearchMediator.QUERY_VALID) {
      menu.add(
          new SkinMenuItem(new SearchAction(info, I18nMarker.marktr("Search for Keywords: {0}"))));
    }

    return menu;
  }
 /**
  * Returns <code>true</code> if <code>this</code> {@link UISearchResult} is the same kind as
  * <code>line</code>'s, e.g. one from gnutella and one from gnutella. Currently we compare
  * classes.
  *
  * @param line line to which we compare
  * @return <code>true</code> if <code>this</code> {@link UISearchResult} is the same kind as
  *     <code>line</code>'s, e.g. one from gnutella and one from gnutella
  */
 public final boolean isSameKindAs(SearchResultDataLine line) {
   return getSearchResult().getClass().equals(line.getSearchResult().getClass());
 }