directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1493788 - /directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/ModWidget.java
Date Mon, 17 Jun 2013 14:44:14 GMT
Author: pamarcelot
Date: Mon Jun 17 14:44:13 2013
New Revision: 1493788

URL: http://svn.apache.org/r1493788
Log:
Fix for DIRSTUDIO-792 (Batch operation Next button inactive)

Modified:
    directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/ModWidget.java

Modified: directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/ModWidget.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/ModWidget.java?rev=1493788&r1=1493787&r2=1493788&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/ModWidget.java
(original)
+++ directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/ModWidget.java
Mon Jun 17 14:44:13 2013
@@ -51,7 +51,7 @@ import org.eclipse.swt.widgets.Text;
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class ModWidget extends BrowserWidget implements ModifyListener
+public class ModWidget extends BrowserWidget
 {
     /** The scrolled composite */
     private ScrolledComposite scrolledComposite;
@@ -68,6 +68,15 @@ public class ModWidget extends BrowserWi
     /** The resulting LDIF */
     private String ldif;
 
+    // Listeners
+    private ModifyListener modifyListener = new ModifyListener()
+    {
+        public void modifyText( ModifyEvent e )
+        {
+            validate( true );
+        }
+    };
+
 
     /**
      * Creates a new instance of ModWidget.
@@ -130,15 +139,6 @@ public class ModWidget extends BrowserWi
 
 
     /**
-     * {@inheritDoc}
-     */
-    public void modifyText( ModifyEvent e )
-    {
-        validate( true );
-    }
-
-
-    /**
      * Validates the input elements.
      */
     public void validate( boolean notifyListeners )
@@ -240,12 +240,13 @@ public class ModWidget extends BrowserWi
         modSpec.modType = BaseWidgetUtils.createReadonlyCombo( modSpecComposite, new String[]
             { "add", "replace", "delete" }, 0, 1 ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
         modSpec.modType.setLayoutData( new GridData() );
-        modSpec.modType.addModifyListener( this );
+        modSpec.modType.addModifyListener( modifyListener );
 
         // attribute combo with field decoration and content proposal
         modSpec.modAttributeCombo = BaseWidgetUtils.createCombo( modSpecComposite, new String[0],
-1, 1 );
         new ExtendedContentAssistCommandAdapter( modSpec.modAttributeCombo, new ComboContentAdapter(),
             listContentProposalProvider, null, null, true );
+        modSpec.modAttributeCombo.addModifyListener( modifyListener );
 
         // add button with listener
         modSpec.modAddButton = new Button( composite, SWT.PUSH );
@@ -374,7 +375,7 @@ public class ModWidget extends BrowserWi
         // text field
         valueLine.valueComposite = BaseWidgetUtils.createColumnContainer( modSpec.modGroup,
3, 1 );
         valueLine.valueText = BaseWidgetUtils.createText( valueLine.valueComposite, "", 1
); //$NON-NLS-1$
-        valueLine.valueText.addModifyListener( this );
+        valueLine.valueText.addModifyListener( modifyListener );
 
         // add button with listener
         valueLine.valueAddButton = new Button( valueLine.valueComposite, SWT.PUSH );



Mime
View raw message