directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r829745 - /directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserView.java
Date Mon, 26 Oct 2009 10:29:14 GMT
Author: seelmann
Date: Mon Oct 26 10:29:14 2009
New Revision: 829745

URL: http://svn.apache.org/viewvc?rev=829745&view=rev
Log:
DIRSTUDIO-515 (Add extensibility to Entry Editor)
o Must lookup the original entry/search object when selecting an object in the browser view

Modified:
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserView.java

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserView.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserView.java?rev=829745&r1=829744&r2=829745&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserView.java
(original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserView.java
Mon Oct 26 10:29:14 2009
@@ -274,19 +274,27 @@
                     {
                         IValue value = ( IValue ) obj;
                         IEntry entry = value.getAttribute().getEntry();
+                        // The entry may be a clone, lookup original entry from entry cache.
+                        // The result may be null, in that case the selection won't change.
+                        entry =  entry.getBrowserConnection().getEntryFromCache( entry.getDn()
);
                         select( entry );
                     }
                     else if ( obj instanceof IAttribute )
                     {
                         IAttribute attribute = ( IAttribute ) obj;
                         IEntry entry = attribute.getEntry();
+                        // The entry may be a clone, lookup original entry from entry cache.
+                        // The result may be null, in that case the selection won't change.
+                        entry = entry.getBrowserConnection().getEntryFromCache( entry.getDn()
);
                         select( entry );
-
                     }
                     else if ( obj instanceof ISearchResult )
                     {
                         ISearchResult sr = ( ISearchResult ) obj;
                         ISearch search = sr.getSearch();
+                        // The search may be a clone, lookup original search from search
manager.
+                        // The result may be null, in that case the selection won't change.
+                        search = search.getBrowserConnection().getSearchManager().getSearch(
search.getName() );
                         select( search );
                     }
                     return true;



Mime
View raw message