try
{
String type = memento.getString( "TYPE" );
if ( "IEntry".equals( type ) )
{
IConnection connection = BrowserCorePlugin.getDefault().getConnectionManager().getConnection(
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 ) )
{
IConnection connection = BrowserCorePlugin.getDefault().getConnectionManager().getConnection(
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;
}
}
}
else if ( "IBookmark".equals( type ) )
{
IConnection connection = BrowserCorePlugin.getDefault().getConnectionManager().getConnection(
memento.getString( "CONNECTION" ) );
IBookmark bookmark = connection.getBookmarkManager().getBookmark( memento.getString( "BOOKMARK" ) );
super.setInput( new EntryEditorInput( bookmark ) );
}
}
catch ( NameException e )
{