{
public void decorate( Object element, IDecoration decoration )
{
IEntry entry = null;
if ( element instanceof ISearchResult )
{
ISearchResult searchResult = ( ISearchResult ) element;
entry = searchResult.getEntry();
decoration.addOverlay( BrowserUIPlugin.getDefault().getImageDescriptor(
BrowserUIConstants.IMG_OVR_SEARCHRESULT ), IDecoration.BOTTOM_RIGHT );
}
else if ( element instanceof IEntry )
{
entry = ( IEntry ) element;
if ( entry.getChildrenFilter() != null )
{
decoration.addOverlay( BrowserUIPlugin.getDefault().getImageDescriptor(
BrowserUIConstants.IMG_OVR_FILTERED ), IDecoration.BOTTOM_RIGHT );
}
}
else
{
decoration.addOverlay( null, IDecoration.BOTTOM_RIGHT );
}
if ( entry != null )
{
if ( !entry.isConsistent() )
{
decoration.addOverlay( BrowserUIPlugin.getDefault().getImageDescriptor(
BrowserUIConstants.IMG_OVR_ERROR ), IDecoration.BOTTOM_LEFT );
}
else if ( !entry.isDirectoryEntry() )
{
decoration.addOverlay( BrowserUIPlugin.getDefault().getImageDescriptor(
BrowserUIConstants.IMG_OVR_WARNING ), IDecoration.BOTTOM_LEFT );
}
else