directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1396685 - /directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewProjectWizardInformationPage.java
Date Wed, 10 Oct 2012 16:49:38 GMT
Author: pamarcelot
Date: Wed Oct 10 16:49:37 2012
New Revision: 1396685

URL: http://svn.apache.org/viewvc?rev=1396685&view=rev
Log:
Improved error reporting.

Modified:
    directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewProjectWizardInformationPage.java

Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewProjectWizardInformationPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewProjectWizardInformationPage.java?rev=1396685&r1=1396684&r2=1396685&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewProjectWizardInformationPage.java
(original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewProjectWizardInformationPage.java
Wed Oct 10 16:49:37 2012
@@ -28,6 +28,9 @@ import org.apache.directory.studio.schem
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.ModifyEvent;
 import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Button;
@@ -82,13 +85,6 @@ public class NewProjectWizardInformation
         nameLabel.setText( Messages.getString( "NewProjectWizardInformationPage.ProjectName"
) ); //$NON-NLS-1$
         nameText = new Text( composite, SWT.BORDER );
         nameText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
-        nameText.addModifyListener( new ModifyListener()
-        {
-            public void modifyText( ModifyEvent e )
-            {
-                dialogChanged();
-            }
-        } );
 
         if ( PluginUtils.getSchemaConnectors().size() > 0 )
         {
@@ -101,12 +97,14 @@ public class NewProjectWizardInformation
             typeOfflineRadio = new Button( typeGroup, SWT.RADIO );
             typeOfflineRadio.setText( Messages.getString( "NewProjectWizardInformationPage.OfflineSchema"
) ); //$NON-NLS-1$
             typeOfflineRadio.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false
) );
+
             typeOnlineRadio = new Button( typeGroup, SWT.RADIO );
             typeOnlineRadio.setText( Messages.getString( "NewProjectWizardInformationPage.OnlineSchema"
) ); //$NON-NLS-1$
             typeOnlineRadio.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false
) );
         }
 
         initFields();
+        addListeners();
 
         setControl( composite );
     }
@@ -128,6 +126,32 @@ public class NewProjectWizardInformation
 
 
     /**
+     * Adds the listeners.
+     */
+    private void addListeners()
+    {
+        nameText.addModifyListener( new ModifyListener()
+        {
+            public void modifyText( ModifyEvent e )
+            {
+                dialogChanged();
+            }
+        } );
+
+        SelectionListener dialogChangedSelectionListener = new SelectionAdapter()
+        {
+            public void widgetSelected( SelectionEvent e )
+            {
+                dialogChanged();
+            }
+        };
+
+        typeOfflineRadio.addSelectionListener( dialogChangedSelectionListener );
+        typeOnlineRadio.addSelectionListener( dialogChangedSelectionListener );
+    }
+
+
+    /**
      * This method is called when the user modifies something in the UI.
      */
     private void dialogChanged()



Mime
View raw message