IBookmark bookmark = ( IBookmark ) obj;
return bookmark.getName();
}
else if ( obj instanceof ISearchResult )
{
ISearchResult sr = ( ISearchResult ) obj;
if ( !sr.getSearch().getConnection().equals( sr.getEntry().getConnection() ) )
{
return sr.getEntry().getUrl().toString();
}
else if ( sr.getEntry().hasParententry() )
{
String label = "";
if ( preferences.getSearchResultLabel() == BrowserUIConstants.SHOW_DN )
{
label = sr.getEntry().getDn().toString();
}
else if ( preferences.getSearchResultLabel() == BrowserUIConstants.SHOW_RDN )
{
label = sr.getEntry().getRdn().toString();
}
else if ( preferences.getSearchResultLabel() == BrowserUIConstants.SHOW_RDN_VALUE )
{
label = sr.getEntry().getRdn().getValue();
}
if ( preferences.isSearchResultAbbreviate()
&& label.length() > preferences.getSearchResultAbbreviateMaxLength() )
{
label = Utils.shorten( label, preferences.getSearchResultAbbreviateMaxLength() );
}
return label;
}
else
{
return sr.getEntry().getDn().toString();
}
}
else if ( obj instanceof BrowserCategory )
{