diff org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet027ExternalValidator.d @ 100:e884642ad36e

more work on examples
author Frank Benoit <benoit@tionex.de>
date Thu, 23 Apr 2009 00:02:38 +0200
parents 5d5bd660917f
children
line wrap: on
line diff
--- a/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet027ExternalValidator.d	Wed Apr 22 18:59:26 2009 +0200
+++ b/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet027ExternalValidator.d	Thu Apr 23 00:02:38 2009 +0200
@@ -44,7 +44,7 @@
  * 
  * @since 3.5
  */
-public class Snippet027ExternalValidator extends WizardPage {
+public class Snippet027ExternalValidator : WizardPage {
 
     private Text nameValue;
     private Text emailValue;
@@ -84,7 +84,7 @@
         }
     }
 
-    static class Contact extends AbstractModelObject {
+    static class Contact : AbstractModelObject {
         String name;
         String email;
         String phoneNumber;
@@ -126,11 +126,11 @@
         }
 
         public IStatus validate() {
-            if (name.indexOf(' ') == -1) {
+            if (name.indexOf(' ') is -1) {
                 return ValidationStatus
                         .error("Please enter both first and last name separated by a space.");
             }
-            if (email.indexOf('@') == -1) {
+            if (email.indexOf('@') is -1) {
                 return ValidationStatus
                 .error("Please enter a valid email address containing '@'.");
             }
@@ -225,7 +225,7 @@
         WizardPageSupport.create(this, dbc);
     }
 
-    static class ExternalValidationWizard extends Wizard {
+    static class ExternalValidationWizard : Wizard {
         public void addPages() {
             addPage(new Snippet027ExternalValidator());
         }
@@ -250,7 +250,7 @@
 
                 // The SWT event loop
                 Display display = Display.getCurrent();
-                while (dialog.getShell() != null
+                while (dialog.getShell() !is null
                         && !dialog.getShell().isDisposed()) {
                     if (!display.readAndDispatch()) {
                         display.sleep();