directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r559763 - /directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/controller/SchemaViewController.java
Date Thu, 26 Jul 2007 09:10:51 GMT
Author: pamarcelot
Date: Thu Jul 26 02:10:47 2007
New Revision: 559763

URL: http://svn.apache.org/viewvc?view=rev&rev=559763
Log:
Added an update of all its parents when updating an AT or OC.

Modified:
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/controller/SchemaViewController.java

Modified: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/controller/SchemaViewController.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/controller/SchemaViewController.java?view=diff&rev=559763&r1=559762&r2=559763
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/controller/SchemaViewController.java
(original)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/controller/SchemaViewController.java
Thu Jul 26 02:10:47 2007
@@ -152,7 +152,7 @@
 
             if ( atw != null )
             {
-                viewer.update( atw, null );
+                updateNodeAndParents( atw );
             }
             else
             {
@@ -237,7 +237,7 @@
 
             if ( ocw != null )
             {
-                viewer.update( ocw, null );
+                updateNodeAndParents( ocw );
             }
             else
             {
@@ -782,5 +782,23 @@
         }
 
         return null;
+    }
+
+
+    /**
+     * Updates the give node and its parents.
+     *
+     * @param node
+     *      the node
+     */
+    public void updateNodeAndParents( TreeNode node )
+    {
+        viewer.update( node, null );
+        TreeNode parent = node.getParent();
+        while ( parent != null )
+        {
+            viewer.update( parent, null );
+            parent = parent.getParent();
+        }
     }
 }



Mime
View raw message