directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r569370 - /directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/schemachecker/SchemaChecker.java
Date Fri, 24 Aug 2007 12:55:16 GMT
Author: pamarcelot
Date: Fri Aug 24 05:55:15 2007
New Revision: 569370

URL: http://svn.apache.org/viewvc?rev=569370&view=rev
Log:
Fixed a bug that caused a large number of UI refreshes. The listeners were not called correctly
and too often. 

Modified:
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/schemachecker/SchemaChecker.java

Modified: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/schemachecker/SchemaChecker.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/schemachecker/SchemaChecker.java?rev=569370&r1=569369&r2=569370&view=diff
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/schemachecker/SchemaChecker.java
(original)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/schemachecker/SchemaChecker.java
Fri Aug 24 05:55:15 2007
@@ -85,6 +85,8 @@
         public void attributeTypeAdded( AttributeTypeImpl at )
         {
             checkAttributeType( at );
+
+            notifyListeners();
         }
 
 
@@ -95,6 +97,8 @@
             checkAttributeType( at );
 
             checkDependencies( deps );
+
+            notifyListeners();
         }
 
 
@@ -105,12 +109,16 @@
             removeSchemaObject( at );
 
             checkDependencies( deps );
+
+            notifyListeners();
         }
 
 
         public void objectClassAdded( ObjectClassImpl oc )
         {
             checkObjectClass( oc );
+
+            notifyListeners();
         }
 
 
@@ -121,6 +129,8 @@
             checkObjectClass( oc );
 
             checkDependencies( deps );
+
+            notifyListeners();
         }
 
 
@@ -131,6 +141,8 @@
             removeSchemaObject( oc );
 
             checkDependencies( deps );
+
+            notifyListeners();
         }
 
 
@@ -147,6 +159,8 @@
             {
                 checkObjectClass( oc );
             }
+
+            notifyListeners();
         }
 
 
@@ -163,6 +177,8 @@
             {
                 removeSchemaObject( oc );
             }
+
+            notifyListeners();
         }
     };
 
@@ -267,6 +283,7 @@
                     }
                     monitor.worked( 1 );
                 }
+                notifyListeners();
                 monitor.done();
 
                 return Status.OK_STATUS;
@@ -287,7 +304,7 @@
      */
     private void checkAttributeType( AttributeTypeImpl at )
     {
-        removeSchemaObject( at, false );
+        removeSchemaObject( at );
 
         // Checking OID
         String oid = at.getOid();
@@ -440,8 +457,6 @@
                 dependsOnMap.put( at, substringMR );
             }
         }
-
-        notifyListeners();
     }
 
 
@@ -453,7 +468,7 @@
      */
     private void checkObjectClass( ObjectClassImpl oc )
     {
-        removeSchemaObject( oc, false );
+        removeSchemaObject( oc );
 
         // Checking OID
         String oid = oc.getOid();
@@ -568,8 +583,6 @@
                 }
             }
         }
-
-        notifyListeners();
     }
 
 
@@ -581,20 +594,6 @@
      */
     private void removeSchemaObject( SchemaObject element )
     {
-        removeSchemaObject( element, true );
-    }
-
-
-    /**
-     * Remove the errors and warnings for the given schema element.
-     *
-     * @param element
-     *      a schema element
-     * @param notify
-     *      true if the listeners needs to be notified
-     */
-    private void removeSchemaObject( SchemaObject element, boolean notify )
-    {
         // Removing old errors and warnings
         List<?> errors = ( List<?> ) errorsMap.get( element );
         if ( ( errors != null ) && ( errors.size() >= 1 ) )
@@ -625,12 +624,6 @@
             }
             dependsOnMap.remove( element );
         }
-
-        if ( notify )
-        {
-            notifyListeners();
-        }
-
     }
 
 



Mime
View raw message