directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r587985 - /directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserView.java
Date Wed, 24 Oct 2007 19:54:22 GMT
Author: seelmann
Date: Wed Oct 24 12:54:21 2007
New Revision: 587985

URL: http://svn.apache.org/viewvc?rev=587985&view=rev
Log:
Fix for DIRSTUDIO-230: It is necessary to refresh the JFace data model.

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

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserView.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserView.java?rev=587985&r1=587984&r2=587985&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserView.java
(original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserView.java
Wed Oct 24 12:54:21 2007
@@ -224,12 +224,17 @@
             IEntry[] parentEntries = ( IEntry[] ) entryList.toArray( new IEntry[0] );
             for ( int i = parentEntries.length - 1; i >= 0; i-- )
             {
-
                 if ( !parentEntries[i].isChildrenInitialized() )
                 {
                     parentEntries[i].setChildrenInitialized( true );
                     parentEntries[i].setHasMoreChildren( true );
                 }
+                
+                // force refresh of each parent, beginning from the root
+                // if the entry to select was lazy initialized then the 
+                // JFace model has no knowledge about it so we must
+                // refresh the JFace model from the browser model
+                mainWidget.getViewer().refresh( parentEntries[i], true );
             }
 
             objectToSelect = entry;
@@ -240,7 +245,6 @@
             mainWidget.getViewer().reveal( objectToSelect );
             mainWidget.getViewer().refresh( objectToSelect, true );
             mainWidget.getViewer().setSelection( new StructuredSelection( objectToSelect
), true );
-
         }
     }
 



Mime
View raw message