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 ( this.preferences.getSearchResultLabel() == BrowserUIConstants.SHOW_DN )
{
label = sr.getEntry().getDn().toString();
}
else if ( this.preferences.getSearchResultLabel() == BrowserUIConstants.SHOW_RDN )
{
label = sr.getEntry().getRdn().toString();
}
else if ( this.preferences.getSearchResultLabel() == BrowserUIConstants.SHOW_RDN_VALUE )
{
label = sr.getEntry().getRdn().getValue();
}
if ( this.preferences.isSearchResultAbbreviate()
&& label.length() > this.preferences.getSearchResultAbbreviateMaxLength() )
{
label = Utils.shorten( label, this.preferences.getSearchResultAbbreviateMaxLength() );
// label =
// label.substring(0,this.preferences.getSearchResultAbbreviateMaxLength()/2)
// + "..." +
// label.substring(label.length()-this.preferences.getSearchResultAbbreviateMaxLength()/2,
// label.length());
}
return label;
}
else
{
return sr.getEntry().getDn().toString();
}
}
else if ( obj instanceof BrowserCategory )
{