directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r581538 - /directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/SchemaViewContentProvider.java
Date Wed, 03 Oct 2007 09:17:36 GMT
Author: pamarcelot
Date: Wed Oct  3 02:17:36 2007
New Revision: 581538

URL: http://svn.apache.org/viewvc?rev=581538&view=rev
Log:
Fixed correct behavior of the UI when adding an object class.

Modified:
    directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/SchemaViewContentProvider.java

Modified: directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/SchemaViewContentProvider.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/SchemaViewContentProvider.java?rev=581538&r1=581537&r2=581538&view=diff
==============================================================================
--- directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/SchemaViewContentProvider.java
(original)
+++ directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/SchemaViewContentProvider.java
Wed Oct  3 02:17:36 2007
@@ -754,29 +754,32 @@
             }
         }
 
-        //        List<Object> children = hierarchyManager.getChildren( oc );
-        //        if ( children != null )
-        //        {
-        //            for ( Object child : children )
-        //            {
-        //                List<TreeNode> childOCWs = getWrappers( child );
-        //                if ( childOCWs != null )
-        //                {
-        //                    
-        //                }
-        //                
-        //                
-        //                elementsToWrappersMap.remove( child );
-        //                childATW.getParent().removeChild( childATW );
-        //
-        //                for ( TreeNode createdWrapper : createdWrappers )
-        //                {
-        //                    AttributeTypeWrapper atw = new AttributeTypeWrapper( ( AttributeTypeImpl
) child, createdWrapper );
-        //                    atw.getParent().addChild( atw );
-        //                    elementsToWrappersMap.put( ( AttributeTypeImpl ) child, atw
);
-        //                }
-        //            }
-        //        }
+        List<Object> children = hierarchyManager.getChildren( oc );
+        if ( children != null )
+        {
+            for ( Object child : children )
+            {
+                List<TreeNode> childOCWs = getWrappers( child );
+                if ( childOCWs != null )
+                {
+                    for ( TreeNode childOCW : childOCWs )
+                    {
+                        if ( root.equals( childOCW.getParent() ) )
+                        {
+                            elementsToWrappersMap.remove( child );
+                            childOCW.getParent().removeChild( childOCW );
+                        }
+                    }
+                }
+
+                for ( TreeNode createdWrapper : createdWrappers )
+                {
+                    ObjectClassWrapper ocw = new ObjectClassWrapper( ( ObjectClassImpl )
child, createdWrapper );
+                    ocw.getParent().addChild( ocw );
+                    elementsToWrappersMap.put( ( ObjectClassImpl ) child, ocw );
+                }
+            }
+        }
     }
 
 



Mime
View raw message