String type = memento.getString( "TYPE" );
if ( "IEntry".equals( type ) )
{
IBrowserConnection connection = BrowserCorePlugin.getDefault().getConnectionManager().getBrowserConnectionById(
memento.getString( "CONNECTION" ) );
DN dn = new DN( memento.getString( "DN" ) );
IEntry entry = connection.getEntryFromCache( dn );
super.setInput( new EntryEditorInput( entry ) );
}
else if ( "ISearchResult".equals( type ) )
{
IBrowserConnection connection = BrowserCorePlugin.getDefault().getConnectionManager().getBrowserConnectionById(
memento.getString( "CONNECTION" ) );
ISearch search = connection.getSearchManager().getSearch( memento.getString( "SEARCH" ) );
ISearchResult[] searchResults = search.getSearchResults();
DN dn = new DN( memento.getString( "DN" ) );
for ( int i = 0; i < searchResults.length; i++ )
{
if ( dn.equals( searchResults[i].getDn() ) )
{
super.setInput( new EntryEditorInput( searchResults[i] ) );
break;
}
}