Return-Path: X-Original-To: apmail-directory-commits-archive@www.apache.org Delivered-To: apmail-directory-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4813BD86C for ; Wed, 10 Oct 2012 16:50:25 +0000 (UTC) Received: (qmail 66251 invoked by uid 500); 10 Oct 2012 16:50:25 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 66191 invoked by uid 500); 10 Oct 2012 16:50:25 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 66184 invoked by uid 99); 10 Oct 2012 16:50:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Oct 2012 16:50:25 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Oct 2012 16:50:22 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 4D69623889D5 for ; Wed, 10 Oct 2012 16:49:38 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@directory.apache.org From: pamarcelot@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121010164938.4D69623889D5@eris.apache.org> 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()