IBookmark bookmark = ( IBookmark ) obj;
return bookmark.getName();
}
else if ( obj instanceof ISearchResult )
{
ISearchResult sr = ( ISearchResult ) obj;
if ( sr.getEntry() instanceof IContinuation )
{
return sr.getEntry().getUrl().toString();
}
else if ( sr.getEntry().hasParententry() || sr.getEntry() instanceof IRootDSE )
{
String label = ""; //$NON-NLS-1$
if ( sr.getEntry() instanceof IRootDSE )
{
label = "Root DSE"; //$NON-NLS-1$
}
else if ( preferences.getSearchResultLabel() == BrowserCommonConstants.SHOW_DN )
{
label = sr.getEntry().getDn().getUpName();
}
else if ( preferences.getSearchResultLabel() == BrowserCommonConstants.SHOW_RDN )
{
label = sr.getEntry().getRdn().getUpName();
}
else if ( preferences.getSearchResultLabel() == BrowserCommonConstants.SHOW_RDN_VALUE )
{
label = ( String ) sr.getEntry().getRdn().getUpValue();
}
if ( preferences.isSearchResultAbbreviate()
&& label.length() > preferences.getSearchResultAbbreviateMaxLength() )
{
label = Utils.shorten( label, preferences.getSearchResultAbbreviateMaxLength() );
}
return label;
}
else
{
return sr.getEntry().getDn().getUpName();
}
}
else if ( obj instanceof StudioRunnableWithProgress )
{