{
Object objectToSelect = null;
if ( part instanceof EntryEditor )
{
EntryEditor editor = ( EntryEditor ) part;
IEditorInput input = editor.getEditorInput();
if ( input != null && input instanceof EntryEditorInput )
{
EntryEditorInput eei = ( EntryEditorInput ) input;
IEntry entry = eei.getResolvedEntry();
if ( entry != null )
{
objectToSelect = entry.getBrowserConnection().getConnection();
}
}
}
else if ( part instanceof SearchResultEditor )
{
SearchResultEditor editor = ( SearchResultEditor ) part;
IEditorInput input = editor.getEditorInput();
if ( input != null && input instanceof SearchResultEditorInput )
{
SearchResultEditorInput srei = ( SearchResultEditorInput ) input;
ISearch search = srei.getSearch();
if ( search != null )