directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r558059 - in /directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor: model/difference/DifferenceEngine.java view/widget/DifferencesWidget.java
Date Fri, 20 Jul 2007 17:13:06 GMT
Author: pamarcelot
Date: Fri Jul 20 10:13:05 2007
New Revision: 558059

URL: http://svn.apache.org/viewvc?view=rev&rev=558059
Log:
Added the OCs and ATs contained in a removed or added schema into its SchemaDifference as
ObjectClassDifference and AttributeTypeDifference.

Modified:
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/DifferenceEngine.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/widget/DifferencesWidget.java

Modified: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/DifferenceEngine.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/DifferenceEngine.java?view=diff&rev=558059&r1=558058&r2=558059
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/DifferenceEngine.java
(original)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/DifferenceEngine.java
Fri Jul 20 10:13:05 2007
@@ -76,6 +76,20 @@
             {
                 SchemaDifference schemaDifference = new SchemaDifference( schemaFromL1, null,
DifferenceType.REMOVED );
                 differences.add( schemaDifference );
+
+                // Adding attribute types
+                for ( AttributeTypeImpl at : schemaFromL2.getAttributeTypes() )
+                {
+                    schemaDifference.addAttributeTypeDifference( new AttributeTypeDifference(
null, at,
+                        DifferenceType.REMOVED ) );
+                }
+
+                // Adding object classes
+                for ( ObjectClassImpl oc : schemaFromL2.getObjectClasses() )
+                {
+                    schemaDifference.addObjectClassDifference( new ObjectClassDifference(
null, oc,
+                        DifferenceType.REMOVED ) );
+                }
             }
             else
             {
@@ -199,6 +213,20 @@
             {
                 SchemaDifference schemaDifference = new SchemaDifference( null, schemaFromL2,
DifferenceType.ADDED );
                 differences.add( schemaDifference );
+
+                // Adding attribute types
+                for ( AttributeTypeImpl at : schemaFromL2.getAttributeTypes() )
+                {
+                    schemaDifference.addAttributeTypeDifference( new AttributeTypeDifference(
null, at,
+                        DifferenceType.ADDED ) );
+                }
+
+                // Adding object classes
+                for ( ObjectClassImpl oc : schemaFromL2.getObjectClasses() )
+                {
+                    schemaDifference.addObjectClassDifference( new ObjectClassDifference(
null, oc,
+                        DifferenceType.ADDED ) );
+                }
             }
         }
 

Modified: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/widget/DifferencesWidget.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/widget/DifferencesWidget.java?view=diff&rev=558059&r1=558058&r2=558059
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/widget/DifferencesWidget.java
(original)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/widget/DifferencesWidget.java
Fri Jul 20 10:13:05 2007
@@ -67,12 +67,6 @@
  */
 public class DifferencesWidget
 {
-    /** The TreeViewer */
-    private TreeViewer treeViewer;
-
-    /** The TableViewer */
-    private TableViewer tableViewer;
-
     /** The PreferenceStore*/
     private IPreferenceStore store;
 
@@ -89,26 +83,20 @@
         {
             if ( authorizedPrefs.contains( event.getProperty() ) )
             {
-                //                    if ( PluginConstants.PREFS_SCHEMA_VIEW_GROUPING ==
event.getProperty() )
-                //                    {
-                //                        view.reloadViewer();
-                //                    }
-                //                    else
-                //                    {
                 treeViewer.refresh();
-                //                    }
             }
         }
     };
 
     // The MenuItems
+    private TreeViewer treeViewer;
+    private TableViewer tableViewer;
     private MenuItem groupByType;
     private MenuItem groupByProperty;
 
 
     /**
      * Creates a new instance of DifferencesWidget.
-     *
      */
     public DifferencesWidget()
     {



Mime
View raw message