IBookmark bookmark = ( IBookmark ) obj;
return bookmark.getName();
}
else if ( obj instanceof ISearchResult )
{
ISearchResult sr = ( ISearchResult ) obj;
if ( !sr.getSearch().getBrowserConnection().equals( sr.getEntry().getBrowserConnection() ) )
{
return sr.getEntry().getUrl().toString();
}
else if ( sr.getEntry().hasParententry() || sr.getEntry() instanceof IRootDSE )
{
String label = "";
if ( sr.getEntry() instanceof IRootDSE )
{
label = "Root DSE";
}
else if ( preferences.getSearchResultLabel() == BrowserCommonConstants.SHOW_DN )
{
label = sr.getEntry().getDn().toString();
}
else if ( preferences.getSearchResultLabel() == BrowserCommonConstants.SHOW_RDN )
{
label = sr.getEntry().getRdn().toString();
}
else if ( preferences.getSearchResultLabel() == BrowserCommonConstants.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 )
{