directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1691646 - /directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/OrderedStringValueDialog.java
Date Fri, 17 Jul 2015 21:20:24 GMT
Author: elecharny
Date: Fri Jul 17 21:20:23 2015
New Revision: 1691646

URL: http://svn.apache.org/r1691646
Log:
We don't manage the prefix into the Dialog anymore : it's done by the TableWidget

Modified:
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/OrderedStringValueDialog.java

Modified: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/OrderedStringValueDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/OrderedStringValueDialog.java?rev=1691646&r1=1691645&r2=1691646&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/OrderedStringValueDialog.java
(original)
+++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/OrderedStringValueDialog.java
Fri Jul 17 21:20:23 2015
@@ -166,12 +166,6 @@ public class OrderedStringValueDialog ex
                 stringValue.setText( editedElement.getValue() );
             }
         }
-        
-        // Create the prefix if it's a Add : set it to the selected position atm
-        if ( isAdd() )
-        { 
-            editedElement.setPrefix( getSelectedPosition() );
-        }
     }
 
 
@@ -189,29 +183,6 @@ public class OrderedStringValueDialog ex
         OrderedStringValueWrapper newElement = (OrderedStringValueWrapper)editedElement.clone();
         setEditedElement( newElement );
     }
-    
-    
-    @Override
-    public void okPressed()
-    {
-        // We have to check the prefix. If it was an Add, we might have a duplicated prefix.
If so, we have to 
-        // increment the second one and all the following ones
-        if ( isAdd() )
-        { 
-            int position = getSelectedPosition();
-
-            for ( int i = getElements().size() - 1; i >= position ; i-- )
-            {
-                OrderedStringValueWrapper value = getElements().get( i );
-                
-                value.setPrefix( value.getPrefix() + 1 );
-            }
-            
-            getElements().add( position, getEditedElement() );
-        }
-        
-        super.okPressed();
-    }
 
     
     /**



Mime
View raw message