directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r557690 [2/3] - in /directory/studio/trunk/studio-apacheds-schemaeditor/src: main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ main/java/org/apache/directory/studio/apacheds/schemaeditor/view/widget/ main/java/or...
Date Thu, 19 Jul 2007 17:03:36 GMT
Copied: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/SubstringDifference.java (from r555904, directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddSubstringDifference.java)
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/SubstringDifference.java?view=diff&rev=557690&p1=directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddSubstringDifference.java&r1=555904&p2=directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/SubstringDifference.java&r2=557690
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddSubstringDifference.java (original)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/SubstringDifference.java Thu Jul 19 10:03:26 2007
@@ -21,39 +21,39 @@
 
 
 /**
- * This class represents the difference of an added substring.
+ * This class represents a difference of substring.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class AddSubstringDifference extends AbstractAddDifference
+public class SubstringDifference extends AbstractPropertyDifference
 {
     /**
-     * Creates a new instance of AddSubstringDifference.
+     * Creates a new instance of SubstringDifference.
      *
      * @param source
      *      the source Object
      * @param destination
      *      the destination Object
+     * @param type
+     *      the type
      */
-    public AddSubstringDifference( Object source, Object destination )
+    public SubstringDifference( Object source, Object destination, DifferenceType type )
     {
-        super( source, destination );
+        super( source, destination, type );
     }
 
 
     /**
-     * Creates a new instance of AddSubstringDifference.
+     * Creates a new instance of SubstringDifference.
      *
      * @param source
      *      the source Object
      * @param destination
      *      the destination Object
-     * @param value
-     *      the value
      */
-    public AddSubstringDifference( Object source, Object destination, Object value )
+    public SubstringDifference( Object source, Object destination )
     {
-        super( source, destination, value );
+        super( source, destination );
     }
 }

Copied: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/SuperiorATDifference.java (from r555904, directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddSuperiorATDifference.java)
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/SuperiorATDifference.java?view=diff&rev=557690&p1=directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddSuperiorATDifference.java&r1=555904&p2=directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/SuperiorATDifference.java&r2=557690
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddSuperiorATDifference.java (original)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/SuperiorATDifference.java Thu Jul 19 10:03:26 2007
@@ -21,39 +21,39 @@
 
 
 /**
- * This class represents the difference of an added superior attribute type.
+ * This class represents a difference of superior attribute type.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class AddSuperiorATDifference extends AbstractAddDifference
+public class SuperiorATDifference extends AbstractPropertyDifference
 {
     /**
-     * Creates a new instance of AddSuperiorATDifference.
+     * Creates a new instance of SuperiorATDifference.
      *
      * @param source
      *      the source Object
      * @param destination
      *      the destination Object
+     * @param type
+     *      the type
      */
-    public AddSuperiorATDifference( Object source, Object destination )
+    public SuperiorATDifference( Object source, Object destination, DifferenceType type )
     {
-        super( source, destination );
+        super( source, destination, type );
     }
 
 
     /**
-     * Creates a new instance of AddSuperiorATDifference.
+     * Creates a new instance of SuperiorATDifference.
      *
      * @param source
      *      the source Object
      * @param destination
      *      the destination Object
-     * @param value
-     *      the value
      */
-    public AddSuperiorATDifference( Object source, Object destination, Object value )
+    public SuperiorATDifference( Object source, Object destination )
     {
-        super( source, destination, value );
+        super( source, destination );
     }
 }

Copied: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/SuperiorOCDifference.java (from r555904, directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddSuperiorOCDifference.java)
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/SuperiorOCDifference.java?view=diff&rev=557690&p1=directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddSuperiorOCDifference.java&r1=555904&p2=directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/SuperiorOCDifference.java&r2=557690
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddSuperiorOCDifference.java (original)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/SuperiorOCDifference.java Thu Jul 19 10:03:26 2007
@@ -21,39 +21,39 @@
 
 
 /**
- * This class represents the difference of an added superior object class.
+ * This class represents a difference of added superior object class.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class AddSuperiorOCDifference extends AbstractAddDifference
+public class SuperiorOCDifference extends AbstractPropertyDifference
 {
     /**
-     * Creates a new instance of AddSuperiorOCDifference.
+     * Creates a new instance of SuperiorOCDifference.
      *
      * @param source
      *      the source Object
      * @param destination
      *      the destination Object
+     * @param type
+     *      the type
      */
-    public AddSuperiorOCDifference( Object source, Object destination )
+    public SuperiorOCDifference( Object source, Object destination, DifferenceType type )
     {
-        super( source, destination );
+        super( source, destination, type );
     }
 
 
     /**
-     * Creates a new instance of AddSuperiorOCDifference.
+     * Creates a new instance of SuperiorOCDifference.
      *
      * @param source
      *      the source Object
      * @param destination
      *      the destination Object
-     * @param value
-     *      the value
      */
-    public AddSuperiorOCDifference( Object source, Object destination, Object value )
+    public SuperiorOCDifference( Object source, Object destination )
     {
-        super( source, destination, value );
+        super( source, destination );
     }
 }

Copied: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/SyntaxDifference.java (from r555904, directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddSyntaxDifference.java)
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/SyntaxDifference.java?view=diff&rev=557690&p1=directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddSyntaxDifference.java&r1=555904&p2=directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/SyntaxDifference.java&r2=557690
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddSyntaxDifference.java (original)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/SyntaxDifference.java Thu Jul 19 10:03:26 2007
@@ -21,39 +21,39 @@
 
 
 /**
- * This class represents the difference of an added syntax.
+ * This class represents a difference of syntax.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class AddSyntaxDifference extends AbstractAddDifference
+public class SyntaxDifference extends AbstractPropertyDifference
 {
     /**
-     * Creates a new instance of AddSyntaxDifference.
+     * Creates a new instance of SyntaxDifference.
      *
      * @param source
      *      the source Object
      * @param destination
      *      the destination Object
+     * @param type
+     *      the type
      */
-    public AddSyntaxDifference( Object source, Object destination )
+    public SyntaxDifference( Object source, Object destination, DifferenceType type )
     {
-        super( source, destination );
+        super( source, destination, type );
     }
 
 
     /**
-     * Creates a new instance of AddSyntaxDifference.
+     * Creates a new instance of SyntaxDifference.
      *
      * @param source
      *      the source Object
      * @param destination
      *      the destination Object
-     * @param value
-     *      the value
      */
-    public AddSyntaxDifference( Object source, Object destination, Object value )
+    public SyntaxDifference( Object source, Object destination )
     {
-        super( source, destination, value );
+        super( source, destination );
     }
 }

Copied: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/SyntaxLengthDifference.java (from r555904, directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddSyntaxLengthDifference.java)
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/SyntaxLengthDifference.java?view=diff&rev=557690&p1=directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddSyntaxLengthDifference.java&r1=555904&p2=directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/SyntaxLengthDifference.java&r2=557690
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddSyntaxLengthDifference.java (original)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/SyntaxLengthDifference.java Thu Jul 19 10:03:26 2007
@@ -21,39 +21,39 @@
 
 
 /**
- * This class represents the difference of an added syntax length.
+ * This class represents a difference of syntax length.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class AddSyntaxLengthDifference extends AbstractAddDifference
+public class SyntaxLengthDifference extends AbstractPropertyDifference
 {
     /**
-     * Creates a new instance of AddSyntaxLengthDifference.
+     * Creates a new instance of SyntaxLengthDifference.
      *
      * @param source
      *      the source Object
      * @param destination
      *      the destination Object
+     * @param type
+     *      the type
      */
-    public AddSyntaxLengthDifference( Object source, Object destination )
+    public SyntaxLengthDifference( Object source, Object destination, DifferenceType type )
     {
-        super( source, destination );
+        super( source, destination, type );
     }
 
 
     /**
-     * Creates a new instance of AddSyntaxLengthDifference.
+     * Creates a new instance of SyntaxLengthDifference.
      *
      * @param source
      *      the source Object
      * @param destination
      *      the destination Object
-     * @param value
-     *      the value
      */
-    public AddSyntaxLengthDifference( Object source, Object destination, Object value )
+    public SyntaxLengthDifference( Object source, Object destination )
     {
-        super( source, destination, value );
+        super( source, destination );
     }
 }

Copied: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/UsageDifference.java (from r555904, directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ModifyUsageDifference.java)
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/UsageDifference.java?view=diff&rev=557690&p1=directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ModifyUsageDifference.java&r1=555904&p2=directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/UsageDifference.java&r2=557690
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ModifyUsageDifference.java (original)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/UsageDifference.java Thu Jul 19 10:03:26 2007
@@ -21,41 +21,23 @@
 
 
 /**
- * This class represents the difference of a modified usage.
+ * This class represents a difference of usage.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class ModifyUsageDifference extends AbstractModifyDifference
+public class UsageDifference extends AbstractPropertyDifference
 {
     /**
-     * Creates a new instance of ModifyUsageDifference.
+     * Creates a new instance of UsageDifference.
      *
      * @param source
      *      the source Object
      * @param destination
      *      the destination Object
      */
-    public ModifyUsageDifference( Object source, Object destination )
+    public UsageDifference( Object source, Object destination )
     {
-        super( source, destination );
-    }
-
-
-    /**
-     * Creates a new instance of ModifyUsageDifference.
-     *
-     * @param source
-     *      the source Object
-     * @param destination
-     *      the destination Object
-     * @param oldValue
-     *      the old value
-     * @param newValue
-     *      the new value
-     */
-    public ModifyUsageDifference( Object source, Object destination, Object oldValue, Object newValue )
-    {
-        super( source, destination, oldValue, newValue );
+        super( source, destination, DifferenceType.MODIFIED );
     }
 }

Modified: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/widget/DifferencesWidgetLabelProvider.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/widget/DifferencesWidgetLabelProvider.java?view=diff&rev=557690&r1=557689&r2=557690
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/widget/DifferencesWidgetLabelProvider.java (original)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/widget/DifferencesWidgetLabelProvider.java Thu Jul 19 10:03:26 2007
@@ -22,44 +22,24 @@
 
 import org.apache.directory.studio.apacheds.schemaeditor.Activator;
 import org.apache.directory.studio.apacheds.schemaeditor.PluginConstants;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.AbstractAddDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.AbstractModifyDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.AbstractRemoveDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.AddAliasDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.AddDescriptionDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.AddEqualityDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.AddMandatoryATDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.AddOptionalATDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.AddOrderingDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.AddSubstringDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.AddSuperiorATDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.AddSuperiorOCDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.AddSyntaxDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.AddSyntaxLengthDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.ModifyClassTypeDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.ModifyCollectiveDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.ModifyDescriptionDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.ModifyEqualityDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.ModifyNoUserModificationDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.ModifyObsoleteDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.ModifyOrderingDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.ModifySingleValueDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.ModifySubstringDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.ModifySuperiorATDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.ModifySyntaxDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.ModifySyntaxLengthDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.ModifyUsageDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.RemoveAliasDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.RemoveDescriptionDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.RemoveEqualityDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.RemoveMandatoryATDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.RemoveOptionalATDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.RemoveOrderingDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.RemoveSubstringDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.RemoveSuperiorATDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.RemoveSuperiorOCDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.RemoveSyntaxDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.RemoveSyntaxLengthDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.AliasDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.ClassTypeDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.CollectiveDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.DescriptionDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.EqualityDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.MandatoryATDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.NoUserModificationDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.ObsoleteDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.OptionalATDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.OrderingDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.PropertyDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.SingleValueDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.SubstringDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.SuperiorATDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.SuperiorOCDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.SyntaxDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.SyntaxLengthDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.UsageDifference;
 import org.eclipse.jface.viewers.LabelProvider;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.ui.plugin.AbstractUIPlugin;
@@ -78,20 +58,22 @@
      */
     public Image getImage( Object element )
     {
-        if ( element instanceof AbstractAddDifference )
+        if ( element instanceof PropertyDifference )
         {
-            return AbstractUIPlugin.imageDescriptorFromPlugin( Activator.PLUGIN_ID, PluginConstants.IMG_DIFFERENCE_ADD )
-                .createImage();
-        }
-        else if ( element instanceof AbstractModifyDifference )
-        {
-            return AbstractUIPlugin.imageDescriptorFromPlugin( Activator.PLUGIN_ID,
-                PluginConstants.IMG_DIFFERENCE_MODIFY ).createImage();
-        }
-        else if ( element instanceof AbstractRemoveDifference )
-        {
-            return AbstractUIPlugin.imageDescriptorFromPlugin( Activator.PLUGIN_ID,
-                PluginConstants.IMG_DIFFERENCE_REMOVE ).createImage();
+            PropertyDifference propertyDifference = ( PropertyDifference ) element;
+            switch ( propertyDifference.getType() )
+            {
+                case ADDED:
+                    return AbstractUIPlugin.imageDescriptorFromPlugin( Activator.PLUGIN_ID,
+                        PluginConstants.IMG_DIFFERENCE_ADD ).createImage();
+
+                case MODIFIED:
+                    return AbstractUIPlugin.imageDescriptorFromPlugin( Activator.PLUGIN_ID,
+                        PluginConstants.IMG_DIFFERENCE_MODIFY ).createImage();
+                case REMOVED:
+                    return AbstractUIPlugin.imageDescriptorFromPlugin( Activator.PLUGIN_ID,
+                        PluginConstants.IMG_DIFFERENCE_REMOVE ).createImage();
+            }
         }
 
         // Default
@@ -104,171 +86,201 @@
      */
     public String getText( Object element )
     {
-        if ( element instanceof AbstractAddDifference )
+        if ( element instanceof AliasDifference )
         {
-            if ( element instanceof AddAliasDifference )
-            {
-                return "Added a new alias: " + ( ( AbstractAddDifference ) element ).getValue();
-            }
-            else if ( element instanceof AddDescriptionDifference )
-            {
-                return "Added a description: " + ( ( AbstractAddDifference ) element ).getValue();
-            }
-            else if ( element instanceof AddEqualityDifference )
-            {
-                return "Added an equality matching rule: " + ( ( AbstractAddDifference ) element ).getValue();
-            }
-            else if ( element instanceof AddMandatoryATDifference )
-            {
-                return "Added a new mandatory attribute type: " + ( ( AbstractAddDifference ) element ).getValue();
-            }
-            else if ( element instanceof AddOptionalATDifference )
-            {
-                return "Added a new optional attribute type: " + ( ( AbstractAddDifference ) element ).getValue();
-            }
-            else if ( element instanceof AddOrderingDifference )
-            {
-                return "Added an ordering matching rule: " + ( ( AbstractAddDifference ) element ).getValue();
-            }
-            else if ( element instanceof AddSubstringDifference )
-            {
-                return "Added a substring matching rule: " + ( ( AbstractAddDifference ) element ).getValue();
-            }
-            else if ( element instanceof AddSuperiorATDifference )
-            {
-                return "Added a superior: " + ( ( AbstractAddDifference ) element ).getValue();
-            }
-            else if ( element instanceof AddSuperiorOCDifference )
-            {
-                return "Added a superior: " + ( ( AbstractAddDifference ) element ).getValue();
-            }
-            else if ( element instanceof AddSyntaxDifference )
-            {
-                return "Added a syntax: " + ( ( AbstractAddDifference ) element ).getValue();
-            }
-            else if ( element instanceof AddSyntaxLengthDifference )
+            AliasDifference diff = ( AliasDifference ) element;
+            switch ( diff.getType() )
             {
-                return "Added a syntax length: " + ( ( AbstractAddDifference ) element ).getValue();
+                case ADDED:
+                    return "Added alias: '" + diff.getNewValue() + "'.";
+                case REMOVED:
+                    return "Removed alias: '" + diff.getOldValue() + "'.";
             }
         }
-        else if ( element instanceof AbstractModifyDifference )
+        else if ( element instanceof ClassTypeDifference )
         {
-            if ( element instanceof ModifyClassTypeDifference )
+            ClassTypeDifference diff = ( ClassTypeDifference ) element;
+            switch ( diff.getType() )
             {
-                return "Modified the class type to : " + ( ( AbstractModifyDifference ) element ).getNewValue()
-                    + " (was " + ( ( AbstractModifyDifference ) element ).getOldValue() + ")";
+                case MODIFIED:
+                    return "Modified class type to : '" + diff.getNewValue() + "' (was '" + diff.getOldValue() + "').";
             }
-            else if ( element instanceof ModifyCollectiveDifference )
-            {
-                return "Modified the 'collective' value to : " + ( ( AbstractModifyDifference ) element ).getNewValue()
-                    + " (was " + ( ( AbstractModifyDifference ) element ).getOldValue() + ")";
-            }
-            else if ( element instanceof ModifyDescriptionDifference )
-            {
-                return "Modified the description to : " + ( ( AbstractModifyDifference ) element ).getNewValue()
-                    + " (was " + ( ( AbstractModifyDifference ) element ).getOldValue() + ")";
-            }
-            else if ( element instanceof ModifyEqualityDifference )
-            {
-                return "Modified the equality matching rule to : "
-                    + ( ( AbstractModifyDifference ) element ).getNewValue() + " (was "
-                    + ( ( AbstractModifyDifference ) element ).getOldValue() + ")";
-            }
-            else if ( element instanceof ModifyNoUserModificationDifference )
-            {
-                return "Modified the 'no user modification' value to : "
-                    + ( ( AbstractModifyDifference ) element ).getNewValue() + " (was "
-                    + ( ( AbstractModifyDifference ) element ).getOldValue() + ")";
-            }
-            else if ( element instanceof ModifyObsoleteDifference )
-            {
-                return "Modified the 'obsolete' value to : " + ( ( AbstractModifyDifference ) element ).getNewValue()
-                    + " (was " + ( ( AbstractModifyDifference ) element ).getOldValue() + ")";
-            }
-            else if ( element instanceof ModifyOrderingDifference )
-            {
-                return "Modified the ordering matching rule to : "
-                    + ( ( AbstractModifyDifference ) element ).getNewValue() + " (was "
-                    + ( ( AbstractModifyDifference ) element ).getOldValue() + ")";
-            }
-            else if ( element instanceof ModifySingleValueDifference )
-            {
-                return "Modified the 'single value' value to : "
-                    + ( ( AbstractModifyDifference ) element ).getNewValue() + " (was "
-                    + ( ( AbstractModifyDifference ) element ).getOldValue() + ")";
-            }
-            else if ( element instanceof ModifySubstringDifference )
-            {
-                return "Modified the substring matching rule to : "
-                    + ( ( AbstractModifyDifference ) element ).getNewValue() + " (was "
-                    + ( ( AbstractModifyDifference ) element ).getOldValue() + ")";
-            }
-            else if ( element instanceof ModifySuperiorATDifference )
+        }
+        else if ( element instanceof CollectiveDifference )
+        {
+            CollectiveDifference diff = ( CollectiveDifference ) element;
+            switch ( diff.getType() )
             {
-                return "Modified the superior to : " + ( ( AbstractModifyDifference ) element ).getNewValue()
-                    + " (was " + ( ( AbstractModifyDifference ) element ).getOldValue() + ")";
+                case MODIFIED:
+                    return "Modified 'collective' value to : '" + diff.getNewValue() + "' (was '" + diff.getOldValue()
+                        + "').";
             }
-            else if ( element instanceof ModifySyntaxDifference )
+        }
+        else if ( element instanceof DescriptionDifference )
+        {
+            DescriptionDifference diff = ( DescriptionDifference ) element;
+            switch ( diff.getType() )
             {
-                return "Modified the syntax to : " + ( ( AbstractModifyDifference ) element ).getNewValue() + " (was "
-                    + ( ( AbstractModifyDifference ) element ).getOldValue() + ")";
+                case ADDED:
+                    return "Added description: '" + diff.getNewValue() + "'.";
+                case MODIFIED:
+                    return "Modified description to : '" + diff.getNewValue() + "' (was '" + diff.getOldValue() + "').";
+                case REMOVED:
+                    return "Removed description: '" + diff.getOldValue() + "'.";
             }
-            else if ( element instanceof ModifySyntaxLengthDifference )
+        }
+        else if ( element instanceof EqualityDifference )
+        {
+            EqualityDifference diff = ( EqualityDifference ) element;
+            switch ( diff.getType() )
             {
-                return "Modified the syntax length to : " + ( ( AbstractModifyDifference ) element ).getNewValue()
-                    + " (was " + ( ( AbstractModifyDifference ) element ).getOldValue() + ")";
+                case ADDED:
+                    return "Added equality matching rule: '" + diff.getNewValue() + "'.";
+                case MODIFIED:
+                    return "Modified equality matching rule to : '" + diff.getNewValue() + "' (was '"
+                        + diff.getOldValue() + "').";
+                case REMOVED:
+                    return "Removed equality matching rule: '" + diff.getOldValue() + "'.";
             }
-            else if ( element instanceof ModifyUsageDifference )
+        }
+        else if ( element instanceof MandatoryATDifference )
+        {
+            MandatoryATDifference diff = ( MandatoryATDifference ) element;
+            switch ( diff.getType() )
             {
-                return "Modified the usage to : " + ( ( AbstractModifyDifference ) element ).getNewValue() + " (was "
-                    + ( ( AbstractModifyDifference ) element ).getOldValue() + ")";
+                case ADDED:
+                    return "Added mandatory attribute type: '" + diff.getNewValue() + "'.";
+                case REMOVED:
+                    return "Removed mandatory attribute type: '" + diff.getOldValue() + "'.";
             }
         }
-        else if ( element instanceof AbstractRemoveDifference )
+        else if ( element instanceof NoUserModificationDifference )
         {
-            if ( element instanceof RemoveAliasDifference )
+            NoUserModificationDifference diff = ( NoUserModificationDifference ) element;
+            switch ( diff.getType() )
             {
-                return "Removed the alias: " + ( ( AbstractRemoveDifference ) element ).getValue();
+                case MODIFIED:
+                    return "Modified 'no user modification' value to : '" + diff.getNewValue() + "' (was '"
+                        + diff.getOldValue() + "').";
             }
-            else if ( element instanceof RemoveDescriptionDifference )
+        }
+        else if ( element instanceof ObsoleteDifference )
+        {
+            ObsoleteDifference diff = ( ObsoleteDifference ) element;
+            switch ( diff.getType() )
             {
-                return "Removed the description: " + ( ( AbstractRemoveDifference ) element ).getValue();
+                case MODIFIED:
+                    return "Modified 'obsolete' value to : '" + diff.getNewValue() + "' (was '" + diff.getOldValue()
+                        + "').";
             }
-            else if ( element instanceof RemoveEqualityDifference )
+        }
+        else if ( element instanceof OptionalATDifference )
+        {
+            OptionalATDifference diff = ( OptionalATDifference ) element;
+            switch ( diff.getType() )
             {
-                return "Removed the equality matching rule: " + ( ( AbstractRemoveDifference ) element ).getValue();
+                case ADDED:
+                    return "Added optional attribute type: '" + diff.getNewValue() + "'.";
+                case REMOVED:
+                    return "Removed optional attribute type: '" + diff.getOldValue() + "'.";
             }
-            else if ( element instanceof RemoveMandatoryATDifference )
+        }
+        else if ( element instanceof OrderingDifference )
+        {
+            OrderingDifference diff = ( OrderingDifference ) element;
+            switch ( diff.getType() )
             {
-                return "Removed the mandatory attribute type: " + ( ( AbstractRemoveDifference ) element ).getValue();
+                case ADDED:
+                    return "Added ordering matching rule: '" + diff.getNewValue() + "'.";
+                case MODIFIED:
+                    return "Modified ordering matching rule to : '" + diff.getNewValue() + "' (was '"
+                        + diff.getOldValue() + "').";
+                case REMOVED:
+                    return "Removed ordering matching rule: '" + diff.getOldValue() + "'.";
             }
-            else if ( element instanceof RemoveOptionalATDifference )
+        }
+        else if ( element instanceof SingleValueDifference )
+        {
+            SingleValueDifference diff = ( SingleValueDifference ) element;
+            switch ( diff.getType() )
             {
-                return "Removed the optional attribute type: " + ( ( AbstractRemoveDifference ) element ).getValue();
+                case MODIFIED:
+                    return "Modified 'single value' value to : '" + diff.getNewValue() + "' (was '"
+                        + diff.getOldValue() + "').";
             }
-            else if ( element instanceof RemoveOrderingDifference )
+        }
+        else if ( element instanceof SubstringDifference )
+        {
+            SubstringDifference diff = ( SubstringDifference ) element;
+            switch ( diff.getType() )
             {
-                return "Removed the ordering matching rule: " + ( ( AbstractRemoveDifference ) element ).getValue();
+                case ADDED:
+                    return "Added substring matching rule: '" + diff.getNewValue() + "'.";
+                case MODIFIED:
+                    return "Modified substring matching rule to : '" + diff.getNewValue() + "' (was '"
+                        + diff.getOldValue() + "').";
+                case REMOVED:
+                    return "Removed substring matching rule: '" + diff.getOldValue() + "'.";
             }
-            else if ( element instanceof RemoveSubstringDifference )
+        }
+        else if ( element instanceof SuperiorATDifference )
+        {
+            SuperiorATDifference diff = ( SuperiorATDifference ) element;
+            switch ( diff.getType() )
             {
-                return "Removed the substring matching rule: " + ( ( AbstractRemoveDifference ) element ).getValue();
+                case ADDED:
+                    return "Added superior: '" + diff.getNewValue() + "'.";
+                case MODIFIED:
+                    return "Modified superior to: '" + diff.getNewValue() + "' (was '" + diff.getOldValue() + "').";
+                case REMOVED:
+                    return "Removed superior: '" + diff.getOldValue() + "'.";
             }
-            else if ( element instanceof RemoveSuperiorATDifference )
+        }
+        else if ( element instanceof SuperiorOCDifference )
+        {
+            SuperiorOCDifference diff = ( SuperiorOCDifference ) element;
+            switch ( diff.getType() )
             {
-                return "Removed the superior: " + ( ( AbstractRemoveDifference ) element ).getValue();
+                case ADDED:
+                    return "Added superior: '" + diff.getNewValue() + "'.";
+                case REMOVED:
+                    return "Removed superior: '" + diff.getOldValue() + "'.";
             }
-            else if ( element instanceof RemoveSuperiorOCDifference )
+        }
+        else if ( element instanceof SyntaxDifference )
+        {
+            SyntaxDifference diff = ( SyntaxDifference ) element;
+            switch ( diff.getType() )
             {
-                return "Removed the superior: " + ( ( AbstractRemoveDifference ) element ).getValue();
+                case ADDED:
+                    return "Added syntax: '" + diff.getNewValue() + "'.";
+                case MODIFIED:
+                    return "Modified syntax to: '" + diff.getNewValue() + "' (was '" + diff.getOldValue() + "').";
+                case REMOVED:
+                    return "Removed syntax: '" + diff.getOldValue() + "'.";
             }
-            else if ( element instanceof RemoveSyntaxDifference )
+        }
+        else if ( element instanceof SyntaxLengthDifference )
+        {
+            SyntaxLengthDifference diff = ( SyntaxLengthDifference ) element;
+            switch ( diff.getType() )
             {
-                return "Removed the syntax: " + ( ( AbstractRemoveDifference ) element ).getValue();
+                case ADDED:
+                    return "Added syntax length: '" + diff.getNewValue() + "'.";
+                case MODIFIED:
+                    return "Modified syntax length to: '" + diff.getNewValue() + "' (was '" + diff.getOldValue()
+                        + "').";
+                case REMOVED:
+                    return "Removed syntax length: '" + diff.getOldValue() + "'.";
             }
-            else if ( element instanceof RemoveSyntaxLengthDifference )
+        }
+        else if ( element instanceof UsageDifference )
+        {
+            UsageDifference diff = ( UsageDifference ) element;
+            switch ( diff.getType() )
             {
-                return "Removed the syntax length: " + ( ( AbstractRemoveDifference ) element ).getValue();
+                case MODIFIED:
+                    return "Modified usage to: '" + diff.getNewValue() + "' (was '" + diff.getOldValue() + "').";
             }
         }
 

Modified: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/widget/DifferencesWidgetPropertySorter.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/widget/DifferencesWidgetPropertySorter.java?view=diff&rev=557690&r1=557689&r2=557690
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/widget/DifferencesWidgetPropertySorter.java (original)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/widget/DifferencesWidgetPropertySorter.java Thu Jul 19 10:03:26 2007
@@ -22,7 +22,24 @@
 
 import java.util.Comparator;
 
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.AliasDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.ClassTypeDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.CollectiveDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.DescriptionDifference;
 import org.apache.directory.studio.apacheds.schemaeditor.model.difference.Difference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.EqualityDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.MandatoryATDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.NoUserModificationDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.ObsoleteDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.OptionalATDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.OrderingDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.SingleValueDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.SubstringDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.SuperiorATDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.SuperiorOCDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.SyntaxDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.SyntaxLengthDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.UsageDifference;
 
 
 /**
@@ -38,54 +55,193 @@
      */
     public int compare( Difference diff1, Difference diff2 )
     {
-        return DifferencesWidgetPropertySorterEnum.valueOf( diff1.getClass().getSimpleName() ).getWeight()
-            - DifferencesWidgetPropertySorterEnum.valueOf( diff2.getClass().getSimpleName() ).getWeight();
+        return getWeight( diff1 ) - getWeight( diff2 );
     }
 
-    
+
     /**
-     * This enum is used to get the weight of each Difference.
+     * Gets the weight of the given difference
      *
-     * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
-     * @version $Rev$, $Date$
+     * @param diff
+     *      the difference
+     * @return
+     *      the weight of the difference
      */
-    private enum DifferencesWidgetPropertySorterEnum
+    private int getWeight( Difference diff )
     {
-        AddAliasDifference(1), RemoveAliasDifference(2), AddDescriptionDifference(3), ModifyDescriptionDifference(4), RemoveDescriptionDifference(
-            5), AddSuperiorATDifference(6), ModifySuperiorATDifference(7), RemoveSuperiorATDifference(8), AddSuperiorOCDifference(
-            9), RemoveSuperiorOCDifference(10), ModifyUsageDifference(11), AddSyntaxDifference(12), ModifySyntaxDifference(
-            13), RemoveSyntaxDifference(14), AddSyntaxLengthDifference(15), ModifySyntaxLengthDifference(16), RemoveSyntaxLengthDifference(
-            17), ModifyClassTypeDifference(18), ModifyObsoleteDifference(19), ModifySingleValueDifference(20), ModifyCollectiveDifference(
-            21), ModifyNoUserModificationDifference(22), AddEqualityDifference(23), ModifyEqualityDifference(24), RemoveEqualityDifference(
-            25), AddOrderingDifference(26), ModifyOrderingDifference(27), RemoveOrderingDifference(28), AddSubstringDifference(
-            29), ModifySubstringDifference(30), RemoveSubstringDifference(31), AddMandatoryATDifference(32), RemoveMandatoryATDifference(
-            33), AddOptionalATDifference(34), RemoveOptionalATDifference(35);
-
-        /** The weight */
-        private int weight;
-
-
-        /**
-         * Creates a new instance of DifferencesWidgetTypeSorterEnum.
-         *
-         * @param weight
-         *      the weight
-         */
-        private DifferencesWidgetPropertySorterEnum( int weight )
+        if ( diff instanceof AliasDifference )
         {
-            this.weight = weight;
+            switch ( diff.getType() )
+            {
+                case ADDED:
+                    return 1;
+                case REMOVED:
+                    return 2;
+            }
         }
-
-
-        /**
-         * Gets the weight.
-         *
-         * @return
-         *      the weight
-         */
-        public int getWeight()
+        else if ( diff instanceof ClassTypeDifference )
+        {
+            switch ( diff.getType() )
+            {
+                case MODIFIED:
+                    return 18;
+            }
+        }
+        else if ( diff instanceof CollectiveDifference )
+        {
+            switch ( diff.getType() )
+            {
+                case MODIFIED:
+                    return 21;
+            }
+        }
+        else if ( diff instanceof DescriptionDifference )
         {
-            return weight;
+            switch ( diff.getType() )
+            {
+                case ADDED:
+                    return 3;
+                case MODIFIED:
+                    return 4;
+                case REMOVED:
+                    return 5;
+            }
         }
+        else if ( diff instanceof EqualityDifference )
+        {
+            switch ( diff.getType() )
+            {
+                case ADDED:
+                    return 23;
+                case MODIFIED:
+                    return 24;
+                case REMOVED:
+                    return 25;
+            }
+        }
+        else if ( diff instanceof MandatoryATDifference )
+        {
+            switch ( diff.getType() )
+            {
+                case ADDED:
+                    return 32;
+                case REMOVED:
+                    return 33;
+            }
+        }
+        else if ( diff instanceof NoUserModificationDifference )
+        {
+            switch ( diff.getType() )
+            {
+                case MODIFIED:
+                    return 22;
+            }
+        }
+        else if ( diff instanceof ObsoleteDifference )
+        {
+            switch ( diff.getType() )
+            {
+                case MODIFIED:
+                    return 19;
+            }
+        }
+        else if ( diff instanceof OptionalATDifference )
+        {
+            switch ( diff.getType() )
+            {
+                case ADDED:
+                    return 34;
+                case REMOVED:
+                    return 35;
+            }
+        }
+        else if ( diff instanceof OrderingDifference )
+        {
+            switch ( diff.getType() )
+            {
+                case ADDED:
+                    return 26;
+                case MODIFIED:
+                    return 27;
+                case REMOVED:
+                    return 28;
+            }
+        }
+        else if ( diff instanceof SingleValueDifference )
+        {
+            switch ( diff.getType() )
+            {
+                case MODIFIED:
+                    return 20;
+            }
+        }
+        else if ( diff instanceof SubstringDifference )
+        {
+            switch ( diff.getType() )
+            {
+                case ADDED:
+                    return 29;
+                case MODIFIED:
+                    return 30;
+                case REMOVED:
+                    return 31;
+            }
+        }
+        else if ( diff instanceof SuperiorATDifference )
+        {
+            switch ( diff.getType() )
+            {
+                case ADDED:
+                    return 6;
+                case MODIFIED:
+                    return 7;
+                case REMOVED:
+                    return 8;
+            }
+        }
+        else if ( diff instanceof SuperiorOCDifference )
+        {
+            switch ( diff.getType() )
+            {
+                case ADDED:
+                    return 9;
+                case REMOVED:
+                    return 10;
+            }
+        }
+        else if ( diff instanceof SyntaxDifference )
+        {
+            switch ( diff.getType() )
+            {
+                case ADDED:
+                    return 12;
+                case MODIFIED:
+                    return 13;
+                case REMOVED:
+                    return 14;
+            }
+        }
+        else if ( diff instanceof SyntaxLengthDifference )
+        {
+            switch ( diff.getType() )
+            {
+                case ADDED:
+                    return 15;
+                case MODIFIED:
+                    return 16;
+                case REMOVED:
+                    return 17;
+            }
+        }
+        else if ( diff instanceof UsageDifference )
+        {
+            switch ( diff.getType() )
+            {
+                case MODIFIED:
+                    return 11;
+            }
+        }
+
+        return 0;
     }
 }

Modified: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/widget/DifferencesWidgetTypeSorter.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/widget/DifferencesWidgetTypeSorter.java?view=diff&rev=557690&r1=557689&r2=557690
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/widget/DifferencesWidgetTypeSorter.java (original)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/widget/DifferencesWidgetTypeSorter.java Thu Jul 19 10:03:26 2007
@@ -22,7 +22,24 @@
 
 import java.util.Comparator;
 
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.AliasDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.ClassTypeDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.CollectiveDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.DescriptionDifference;
 import org.apache.directory.studio.apacheds.schemaeditor.model.difference.Difference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.EqualityDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.MandatoryATDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.NoUserModificationDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.ObsoleteDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.OptionalATDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.OrderingDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.SingleValueDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.SubstringDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.SuperiorATDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.SuperiorOCDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.SyntaxDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.SyntaxLengthDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.UsageDifference;
 
 
 /**
@@ -38,53 +55,193 @@
      */
     public int compare( Difference diff1, Difference diff2 )
     {
-        return DifferencesWidgetTypeSorterEnum.valueOf( diff1.getClass().getSimpleName() ).getWeight()
-            - DifferencesWidgetTypeSorterEnum.valueOf( diff2.getClass().getSimpleName() ).getWeight();
+        return getWeight( diff1 ) - getWeight( diff2 );
     }
 
+
     /**
-     * This enum is used to get the weight of each Difference.
+     * Gets the weight of the given difference
      *
-     * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
-     * @version $Rev$, $Date$
+     * @param diff
+     *      the difference
+     * @return
+     *      the weight of the difference
      */
-    private enum DifferencesWidgetTypeSorterEnum
+    private int getWeight( Difference diff )
     {
-        AddAliasDifference(1), AddDescriptionDifference(2), AddSuperiorATDifference(3), AddSuperiorOCDifference(4), AddSyntaxDifference(
-            5), AddSyntaxLengthDifference(6), AddEqualityDifference(7), AddOrderingDifference(8), AddSubstringDifference(
-            9), AddMandatoryATDifference(10), AddOptionalATDifference(11), ModifyDescriptionDifference(12), ModifySuperiorATDifference(
-            13), ModifyUsageDifference(14), ModifySyntaxDifference(15), ModifySyntaxLengthDifference(16), ModifyClassTypeDifference(
-            17), ModifyObsoleteDifference(18), ModifySingleValueDifference(19), ModifyCollectiveDifference(20), ModifyNoUserModificationDifference(
-            21), ModifyEqualityDifference(22), ModifyOrderingDifference(23), ModifySubstringDifference(24), RemoveAliasDifference(
-            25), RemoveDescriptionDifference(26), RemoveSuperiorATDifference(27), RemoveSuperiorOCDifference(28), RemoveSyntaxDifference(
-            29), RemoveSyntaxLengthDifference(30), RemoveEqualityDifference(31), RemoveSubstringDifference(33), RemoveOrderingDifference(
-            32), RemoveMandatoryATDifference(34), RemoveOptionalATDifference(35);
-
-        /** The weight */
-        private int weight;
-
-
-        /**
-         * Creates a new instance of DifferencesWidgetTypeSorterEnum.
-         *
-         * @param weight
-         *      the weight
-         */
-        private DifferencesWidgetTypeSorterEnum( int weight )
+        if ( diff instanceof AliasDifference )
         {
-            this.weight = weight;
+            switch ( diff.getType() )
+            {
+                case ADDED:
+                    return 1;
+                case REMOVED:
+                    return 25;
+            }
         }
-
-
-        /**
-         * Gets the weight.
-         *
-         * @return
-         *      the weight
-         */
-        public int getWeight()
+        else if ( diff instanceof ClassTypeDifference )
+        {
+            switch ( diff.getType() )
+            {
+                case MODIFIED:
+                    return 17;
+            }
+        }
+        else if ( diff instanceof CollectiveDifference )
+        {
+            switch ( diff.getType() )
+            {
+                case MODIFIED:
+                    return 20;
+            }
+        }
+        else if ( diff instanceof DescriptionDifference )
         {
-            return weight;
+            switch ( diff.getType() )
+            {
+                case ADDED:
+                    return 2;
+                case MODIFIED:
+                    return 12;
+                case REMOVED:
+                    return 26;
+            }
         }
+        else if ( diff instanceof EqualityDifference )
+        {
+            switch ( diff.getType() )
+            {
+                case ADDED:
+                    return 7;
+                case MODIFIED:
+                    return 22;
+                case REMOVED:
+                    return 31;
+            }
+        }
+        else if ( diff instanceof MandatoryATDifference )
+        {
+            switch ( diff.getType() )
+            {
+                case ADDED:
+                    return 10;
+                case REMOVED:
+                    return 34;
+            }
+        }
+        else if ( diff instanceof NoUserModificationDifference )
+        {
+            switch ( diff.getType() )
+            {
+                case MODIFIED:
+                    return 21;
+            }
+        }
+        else if ( diff instanceof ObsoleteDifference )
+        {
+            switch ( diff.getType() )
+            {
+                case MODIFIED:
+                    return 18;
+            }
+        }
+        else if ( diff instanceof OptionalATDifference )
+        {
+            switch ( diff.getType() )
+            {
+                case ADDED:
+                    return 11;
+                case REMOVED:
+                    return 35;
+            }
+        }
+        else if ( diff instanceof OrderingDifference )
+        {
+            switch ( diff.getType() )
+            {
+                case ADDED:
+                    return 8;
+                case MODIFIED:
+                    return 23;
+                case REMOVED:
+                    return 32;
+            }
+        }
+        else if ( diff instanceof SingleValueDifference )
+        {
+            switch ( diff.getType() )
+            {
+                case MODIFIED:
+                    return 19;
+            }
+        }
+        else if ( diff instanceof SubstringDifference )
+        {
+            switch ( diff.getType() )
+            {
+                case ADDED:
+                    return 9;
+                case MODIFIED:
+                    return 24;
+                case REMOVED:
+                    return 33;
+            }
+        }
+        else if ( diff instanceof SuperiorATDifference )
+        {
+            switch ( diff.getType() )
+            {
+                case ADDED:
+                    return 3;
+                case MODIFIED:
+                    return 13;
+                case REMOVED:
+                    return 27;
+            }
+        }
+        else if ( diff instanceof SuperiorOCDifference )
+        {
+            switch ( diff.getType() )
+            {
+                case ADDED:
+                    return 4;
+                case REMOVED:
+                    return 28;
+            }
+        }
+        else if ( diff instanceof SyntaxDifference )
+        {
+            switch ( diff.getType() )
+            {
+                case ADDED:
+                    return 5;
+                case MODIFIED:
+                    return 15;
+                case REMOVED:
+                    return 29;
+            }
+        }
+        else if ( diff instanceof SyntaxLengthDifference )
+        {
+            switch ( diff.getType() )
+            {
+                case ADDED:
+                    return 6;
+                case MODIFIED:
+                    return 16;
+                case REMOVED:
+                    return 30;
+            }
+        }
+        else if ( diff instanceof UsageDifference )
+        {
+            switch ( diff.getType() )
+            {
+                case MODIFIED:
+                    return 14;
+            }
+        }
+
+        return 0;
     }
 }

Modified: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/CommitChangesDifferencesWizardPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/CommitChangesDifferencesWizardPage.java?view=diff&rev=557690&r1=557689&r2=557690
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/CommitChangesDifferencesWizardPage.java (original)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/CommitChangesDifferencesWizardPage.java Thu Jul 19 10:03:26 2007
@@ -23,46 +23,13 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.directory.shared.ldap.schema.ObjectClassTypeEnum;
-import org.apache.directory.shared.ldap.schema.UsageEnum;
 import org.apache.directory.studio.apacheds.schemaeditor.Activator;
 import org.apache.directory.studio.apacheds.schemaeditor.PluginConstants;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.AddAliasDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.AddDescriptionDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.AddEqualityDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.AddMandatoryATDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.AddOptionalATDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.AddOrderingDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.AddSubstringDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.AddSuperiorATDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.AddSuperiorOCDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.AddSyntaxDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.AddSyntaxLengthDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.AliasDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.DescriptionDifference;
 import org.apache.directory.studio.apacheds.schemaeditor.model.difference.Difference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.ModifyClassTypeDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.ModifyCollectiveDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.ModifyDescriptionDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.ModifyEqualityDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.ModifyNoUserModificationDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.ModifyObsoleteDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.ModifyOrderingDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.ModifySingleValueDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.ModifySubstringDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.ModifySuperiorATDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.ModifySyntaxDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.ModifySyntaxLengthDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.ModifyUsageDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.RemoveAliasDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.RemoveDescriptionDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.RemoveEqualityDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.RemoveMandatoryATDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.RemoveOptionalATDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.RemoveOrderingDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.RemoveSubstringDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.RemoveSuperiorATDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.RemoveSuperiorOCDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.RemoveSyntaxDifference;
-import org.apache.directory.studio.apacheds.schemaeditor.model.difference.RemoveSyntaxLengthDifference;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.DifferenceType;
+import org.apache.directory.studio.apacheds.schemaeditor.model.difference.PropertyDifference;
 import org.apache.directory.studio.apacheds.schemaeditor.view.widget.DifferencesWidget;
 import org.eclipse.jface.wizard.WizardPage;
 import org.eclipse.swt.SWT;
@@ -108,43 +75,60 @@
         differencesWidget.createWidget( composite );
 
         List<Difference> differences = new ArrayList<Difference>();
-        differences.add( new AddAliasDifference( null, null, "alias1" ) );
-        differences.add( new RemoveAliasDifference( null, null, "alias2" ) );
-        differences.add( new AddDescriptionDifference( null, null, "Description" ) );
-        differences.add( new ModifyDescriptionDifference( null, null, "Old description", "New Description" ) );
-        differences.add( new RemoveDescriptionDifference( null, null, "Description" ) );
-        differences.add( new AddEqualityDifference( null, null, "equality" ) );
-        differences.add( new ModifyEqualityDifference( null, null, "old equality", "new equality" ) );
-        differences.add( new RemoveEqualityDifference( null, null, "equality" ) );
-        differences.add( new AddMandatoryATDifference( null, null, "name" ) );
-        differences.add( new RemoveMandatoryATDifference( null, null, "name2" ) );
-        differences.add( new AddOptionalATDifference( null, null, "name" ) );
-        differences.add( new RemoveOptionalATDifference( null, null, "name2" ) );
-        differences.add( new AddOrderingDifference( null, null, "ordering" ) );
-        differences.add( new ModifyOrderingDifference( null, null, "old ordering", "new ordering" ) );
-        differences.add( new RemoveOrderingDifference( null, null, "ordering" ) );
-        differences.add( new AddSubstringDifference( null, null, "substring" ) );
-        differences.add( new ModifySubstringDifference( null, null, "old substring", "new substring" ) );
-        differences.add( new RemoveSubstringDifference( null, null, "substring" ) );
-        differences.add( new AddSuperiorATDifference( null, null, "supAT" ) );
-        differences.add( new ModifySuperiorATDifference( null, null, "oldSupAT", "newSupAT" ) );
-        differences.add( new RemoveSuperiorATDifference( null, null, "supAT" ) );
-        differences.add( new AddSuperiorOCDifference( null, null, "supOC" ) );
-        differences.add( new RemoveSuperiorOCDifference( null, null, "supOC" ) );
-        differences.add( new AddSyntaxDifference( null, null, "syntax" ) );
-        differences.add( new ModifySyntaxDifference( null, null, "syntax1", "syntax2" ) );
-        differences.add( new RemoveSyntaxDifference( null, null, "syntax" ) );
-        differences.add( new AddSyntaxLengthDifference( null, null, 1234 ) );
-        differences.add( new ModifySyntaxLengthDifference( null, null, 1234, 12345 ) );
-        differences.add( new RemoveSyntaxLengthDifference( null, null, 1234 ) );
-        differences.add( new ModifyClassTypeDifference( null, null, ObjectClassTypeEnum.AUXILIARY,
-            ObjectClassTypeEnum.ABSTRACT ) );
-        differences.add( new ModifyCollectiveDifference( null, null, false, true ) );
-        differences.add( new ModifyNoUserModificationDifference( null, null, true, false ) );
-        differences.add( new ModifyObsoleteDifference( null, null, true, false ) );
-        differences.add( new ModifySingleValueDifference( null, null, true, false ) );
-        differences.add( new ModifyUsageDifference( null, null, UsageEnum.DISTRIBUTED_OPERATION,
-            UsageEnum.DSA_OPERATION ) );
+        PropertyDifference diff = new AliasDifference( null, null, DifferenceType.ADDED );
+        diff.setNewValue( "alias1" );
+        differences.add( diff );
+        
+        diff = new AliasDifference( null, null, DifferenceType.REMOVED );
+        diff.setOldValue( "alias2" );
+        differences.add( diff );
+
+        diff = new DescriptionDifference( null, null, DifferenceType.ADDED );
+        diff.setNewValue( "Description" );
+        differences.add( diff );
+        
+        diff = new DescriptionDifference( null, null, DifferenceType.MODIFIED );
+        diff.setOldValue( "Old Description" );
+        diff.setNewValue( "New Description" );
+        differences.add( diff );
+        
+        diff = new DescriptionDifference( null, null, DifferenceType.REMOVED );
+        diff.setOldValue( "Description" );
+        differences.add( diff );
+        
+
+        //        differences.add( new AddEqualityDifference( null, null, "equality" ) );
+        //        differences.add( new ModifyEqualityDifference( null, null, "old equality", "new equality" ) );
+        //        differences.add( new RemoveEqualityDifference( null, null, "equality" ) );
+        //        differences.add( new AddMandatoryATDifference( null, null, "name" ) );
+        //        differences.add( new RemoveMandatoryATDifference( null, null, "name2" ) );
+        //        differences.add( new AddOptionalATDifference( null, null, "name" ) );
+        //        differences.add( new RemoveOptionalATDifference( null, null, "name2" ) );
+        //        differences.add( new AddOrderingDifference( null, null, "ordering" ) );
+        //        differences.add( new ModifyOrderingDifference( null, null, "old ordering", "new ordering" ) );
+        //        differences.add( new RemoveOrderingDifference( null, null, "ordering" ) );
+        //        differences.add( new AddSubstringDifference( null, null, "substring" ) );
+        //        differences.add( new ModifySubstringDifference( null, null, "old substring", "new substring" ) );
+        //        differences.add( new RemoveSubstringDifference( null, null, "substring" ) );
+        //        differences.add( new AddSuperiorATDifference( null, null, "supAT" ) );
+        //        differences.add( new ModifySuperiorATDifference( null, null, "oldSupAT", "newSupAT" ) );
+        //        differences.add( new RemoveSuperiorATDifference( null, null, "supAT" ) );
+        //        differences.add( new AddSuperiorOCDifference( null, null, "supOC" ) );
+        //        differences.add( new RemoveSuperiorOCDifference( null, null, "supOC" ) );
+        //        differences.add( new AddSyntaxDifference( null, null, "syntax" ) );
+        //        differences.add( new ModifySyntaxDifference( null, null, "syntax1", "syntax2" ) );
+        //        differences.add( new RemoveSyntaxDifference( null, null, "syntax" ) );
+        //        differences.add( new AddSyntaxLengthDifference( null, null, 1234 ) );
+        //        differences.add( new ModifySyntaxLengthDifference( null, null, 1234, 12345 ) );
+        //        differences.add( new RemoveSyntaxLengthDifference( null, null, 1234 ) );
+        //        differences.add( new ModifyClassTypeDifference( null, null, ObjectClassTypeEnum.AUXILIARY,
+        //            ObjectClassTypeEnum.ABSTRACT ) );
+        //        differences.add( new ModifyCollectiveDifference( null, null, false, true ) );
+        //        differences.add( new ModifyNoUserModificationDifference( null, null, true, false ) );
+        //        differences.add( new ModifyObsoleteDifference( null, null, true, false ) );
+        //        differences.add( new ModifySingleValueDifference( null, null, true, false ) );
+        //        differences.add( new ModifyUsageDifference( null, null, UsageEnum.DISTRIBUTED_OPERATION,
+        //            UsageEnum.DSA_OPERATION ) );
         differencesWidget.setInput( differences );
 
         initFields();

Added: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wrappers/difference/AbstractDifferenceWrapper.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wrappers/difference/AbstractDifferenceWrapper.java?view=auto&rev=557690
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wrappers/difference/AbstractDifferenceWrapper.java (added)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wrappers/difference/AbstractDifferenceWrapper.java Thu Jul 19 10:03:26 2007
@@ -0,0 +1,135 @@
+package org.apache.directory.studio.apacheds.schemaeditor.view.wrappers.difference;
+
+
+import org.apache.directory.studio.apacheds.schemaeditor.view.wrappers.AbstractTreeNode;
+import org.apache.directory.studio.apacheds.schemaeditor.view.wrappers.TreeNode;
+
+
+/**
+ * This class represents an abstract difference wrapper.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public abstract class AbstractDifferenceWrapper extends AbstractTreeNode
+{
+    /** The original object */
+    private Object originalObject;
+
+    /** The modified object */
+    private Object modifiedObject;
+
+    /** The state */
+    private WrapperState state;
+
+
+    /**
+     * Creates a new instance of AbstractDifferenceWrapper.
+     *
+     * @param originalObject
+     *      the original object
+     * @param modifiedObject
+     *      the modified object
+     * @param parent
+     *      the parent TreeNode
+     */
+    public AbstractDifferenceWrapper( Object originalObject, Object modifiedObject, TreeNode parent )
+    {
+        super( parent );
+        this.originalObject = originalObject;
+        this.modifiedObject = modifiedObject;
+    }
+
+
+    /**
+     * Creates a new instance of AbstractDifferenceWrapper.
+     *
+     * @param originalObject
+     *      the original object
+     * @param modifiedObject
+     *      the modified object
+     * @param state
+     *      the state of the wrapper
+     * @param parent
+     *      the parent TreeNode
+     */
+    public AbstractDifferenceWrapper( Object originalObject, Object modifiedObject, WrapperState state, TreeNode parent )
+    {
+        super( parent );
+        this.originalObject = originalObject;
+        this.modifiedObject = modifiedObject;
+        this.state = state;
+    }
+
+
+    /**
+     * Gets the original object.
+     *
+     * @return
+     *      the original object
+     */
+    public Object getOriginalObject()
+    {
+        return originalObject;
+    }
+
+
+    /**
+     * Sets the original object.
+     *
+     * @param originalObject
+     *      the original object
+     */
+    public void setOriginalObject( Object originalObject )
+    {
+        this.originalObject = originalObject;
+    }
+
+
+    /**
+     * Gets the modified object.
+     *
+     * @return
+     *      the modified object
+     */
+    public Object getModifiedObject()
+    {
+        return modifiedObject;
+    }
+
+
+    /**
+     * Sets the modified object
+     *
+     * @param modifiedObject
+     *      the modified object
+     */
+    public void setModifiedObject( Object modifiedObject )
+    {
+        this.modifiedObject = modifiedObject;
+    }
+
+
+    /**
+     * Gets the state.
+     *
+     * @return
+     *      the state
+     */
+    public WrapperState getState()
+    {
+        return state;
+    }
+
+
+    /**
+     * Sets the state.
+     *
+     * @param state
+     *      the state
+     */
+    public void setState( WrapperState state )
+    {
+        this.state = state;
+    }
+}

Added: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wrappers/difference/AttributeTypeDifferenceWrapper.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wrappers/difference/AttributeTypeDifferenceWrapper.java?view=auto&rev=557690
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wrappers/difference/AttributeTypeDifferenceWrapper.java (added)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wrappers/difference/AttributeTypeDifferenceWrapper.java Thu Jul 19 10:03:26 2007
@@ -0,0 +1,47 @@
+package org.apache.directory.studio.apacheds.schemaeditor.view.wrappers.difference;
+
+
+import org.apache.directory.studio.apacheds.schemaeditor.view.wrappers.TreeNode;
+
+
+/**
+ * This class represent the wrapper for an attribute type.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class AttributeTypeDifferenceWrapper extends AbstractDifferenceWrapper
+{
+    /**
+     * Creates a new instance of AttributeTypeDifferenceWrapper.
+     *
+     * @param originalObject
+     *      the original attribute type
+     * @param modifiedObject
+     *      the modified attribute type
+     * @param parent
+     *      the parent TreeNode
+     */
+    public AttributeTypeDifferenceWrapper( Object originalObject, Object modifiedObject, TreeNode parent )
+    {
+        super( originalObject, modifiedObject, parent );
+    }
+
+
+    /**
+     * Creates a new instance of AttributeTypeDifferenceWrapper.
+     *
+     * @param originalObject
+     *      the original attribute type
+     * @param modifiedObject
+     *      the modified attribute type
+     * @param state
+     *      the state of the wrapper
+     * @param parent
+     *      the parent TreeNode
+     */
+    public AttributeTypeDifferenceWrapper( Object originalObject, Object modifiedObject, WrapperState state, TreeNode parent )
+    {
+        super( originalObject, modifiedObject, state, parent );
+    }
+}

Added: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wrappers/difference/ObjectClassDifferenceWrapper.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wrappers/difference/ObjectClassDifferenceWrapper.java?view=auto&rev=557690
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wrappers/difference/ObjectClassDifferenceWrapper.java (added)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wrappers/difference/ObjectClassDifferenceWrapper.java Thu Jul 19 10:03:26 2007
@@ -0,0 +1,47 @@
+package org.apache.directory.studio.apacheds.schemaeditor.view.wrappers.difference;
+
+
+import org.apache.directory.studio.apacheds.schemaeditor.view.wrappers.TreeNode;
+
+
+/**
+ * This class represent the wrapper for an object class.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ObjectClassDifferenceWrapper extends AbstractDifferenceWrapper
+{
+    /**
+     * Creates a new instance of ObjectClassDifferenceWrapper.
+     *
+     * @param originalObject
+     *      the original object class
+     * @param modifiedObject
+     *      the modified object class
+     * @param parent
+     *      the parent TreeNode
+     */
+    public ObjectClassDifferenceWrapper( Object originalObject, Object modifiedObject, TreeNode parent )
+    {
+        super( originalObject, modifiedObject, parent );
+    }
+
+
+    /**
+     * Creates a new instance of ObjectClassDifferenceWrapper.
+     *
+     * @param originalObject
+     *      the original object class
+     * @param modifiedObject
+     *      the modified object class
+     * @param state
+     *      the state of the wrapper
+     * @param parent
+     *      the parent TreeNode
+     */
+    public ObjectClassDifferenceWrapper( Object originalObject, Object modifiedObject, WrapperState state, TreeNode parent )
+    {
+        super( originalObject, modifiedObject, state, parent );
+    }
+}

Added: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wrappers/difference/SchemaDifferenceWrapper.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wrappers/difference/SchemaDifferenceWrapper.java?view=auto&rev=557690
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wrappers/difference/SchemaDifferenceWrapper.java (added)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wrappers/difference/SchemaDifferenceWrapper.java Thu Jul 19 10:03:26 2007
@@ -0,0 +1,47 @@
+package org.apache.directory.studio.apacheds.schemaeditor.view.wrappers.difference;
+
+
+import org.apache.directory.studio.apacheds.schemaeditor.view.wrappers.TreeNode;
+
+
+/**
+ * This class represent the wrapper for a schema.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class SchemaDifferenceWrapper extends AbstractDifferenceWrapper
+{
+    /**
+     * Creates a new instance of SchemaDifferenceWrapper.
+     *
+     * @param originalObject
+     *      the original schema
+     * @param modifiedObject
+     *      the modified schema
+     * @param parent
+     *      the parent TreeNode
+     */
+    public SchemaDifferenceWrapper( Object originalObject, Object modifiedObject, TreeNode parent )
+    {
+        super( originalObject, modifiedObject, parent );
+    }
+
+
+    /**
+     * Creates a new instance of SchemaDifferenceWrapper.
+     *
+     * @param originalObject
+     *      the original schema
+     * @param modifiedObject
+     *      the modified schema
+     * @param state
+     *      the state of the wrapper
+     * @param parent
+     *      the parent TreeNode
+     */
+    public SchemaDifferenceWrapper( Object originalObject, Object modifiedObject, WrapperState state, TreeNode parent )
+    {
+        super( originalObject, modifiedObject, state, parent );
+    }
+}

Added: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wrappers/difference/WrapperState.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wrappers/difference/WrapperState.java?view=auto&rev=557690
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wrappers/difference/WrapperState.java (added)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wrappers/difference/WrapperState.java Thu Jul 19 10:03:26 2007
@@ -0,0 +1,10 @@
+
+package org.apache.directory.studio.apacheds.schemaeditor.view.wrappers.difference;
+
+public enum WrapperState
+{
+    IDENTICAL,
+    ADDED,
+    MODFIED,
+    REMOVED
+}



Mime
View raw message