EntryEditorExtension entryEditorExtension = entryEditorManager.getEntryEditorExtension( extensionId );
if ( "IEntry".equals( type ) ) //$NON-NLS-1$
{
IBrowserConnection connection = BrowserCorePlugin.getDefault().getConnectionManager()
.getBrowserConnectionById( memento.getString( "CONNECTION" ) ); //$NON-NLS-1$
LdapDN dn = new LdapDN( memento.getString( "DN" ) ); //$NON-NLS-1$
IEntry entry = connection.getEntryFromCache( dn );
super.setInput( new EntryEditorInput( entry, entryEditorExtension ) );
}
else if ( "ISearchResult".equals( type ) ) //$NON-NLS-1$
{
IBrowserConnection connection = BrowserCorePlugin.getDefault().getConnectionManager()
.getBrowserConnectionById( memento.getString( "CONNECTION" ) ); //$NON-NLS-1$
ISearch search = connection.getSearchManager().getSearch( memento.getString( "SEARCH" ) ); //$NON-NLS-1$
ISearchResult[] searchResults = search.getSearchResults();
LdapDN dn = new LdapDN( memento.getString( "DN" ) ); //$NON-NLS-1$
for ( int i = 0; i < searchResults.length; i++ )
{
if ( dn.equals( searchResults[i].getDn() ) )
{
super.setInput( new EntryEditorInput( searchResults[i], entryEditorExtension ) );
break;
}
}