directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1211592 - /directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/wizards/NewApacheDSConfigurationFileWizard.java
Date Wed, 07 Dec 2011 18:49:45 GMT
Author: pamarcelot
Date: Wed Dec  7 18:49:44 2011
New Revision: 1211592

URL: http://svn.apache.org/viewvc?rev=1211592&view=rev
Log:
Fix for DIRSTUDIO-655 (Switch usage of SWT MessageBox to JFace MessageDialog for info, warning
and error dialogs).

Modified:
    directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/wizards/NewApacheDSConfigurationFileWizard.java

Modified: directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/wizards/NewApacheDSConfigurationFileWizard.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/wizards/NewApacheDSConfigurationFileWizard.java?rev=1211592&r1=1211591&r2=1211592&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/wizards/NewApacheDSConfigurationFileWizard.java
(original)
+++ directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/wizards/NewApacheDSConfigurationFileWizard.java
Wed Dec  7 18:49:44 2011
@@ -34,10 +34,9 @@ import org.apache.directory.studio.apach
 import org.apache.directory.studio.apacheds.configuration.model.v155.ServerXmlIOV155;
 import org.apache.directory.studio.apacheds.configuration.model.v156.ServerXmlIOV156;
 import org.apache.directory.studio.apacheds.configuration.model.v157.ServerXmlIOV157;
+import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.MessageBox;
 import org.eclipse.ui.INewWizard;
 import org.eclipse.ui.IWorkbench;
 import org.eclipse.ui.IWorkbenchPage;
@@ -139,12 +138,9 @@ public class NewApacheDSConfigurationFil
         }
         catch ( ServerXmlIOException e )
         {
-            MessageBox messageBox = new MessageBox( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
-                SWT.OK | SWT.ICON_ERROR );
-            messageBox.setText( Messages.getString( "NewApacheDSConfigurationFileWizard.Error"
) ); //$NON-NLS-1$
-            messageBox
-                .setMessage( Messages.getString( "NewApacheDSConfigurationFileWizard.ErrorReadingFile"
) + e.getMessage() ); //$NON-NLS-1$
-            messageBox.open();
+            MessageDialog.openError( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
+                Messages.getString( "NewApacheDSConfigurationFileWizard.Error" ), //$NON-NLS-1$
+                Messages.getString( "NewApacheDSConfigurationFileWizard.ErrorReadingFile"
) + e.getMessage() ); //$NON-NLS-1$
             return false;
         }
         return true;



Mime
View raw message