Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2010-09-05 04:18:49 +0000
committerEike Stepper2010-09-05 04:18:49 +0000
commit0f2188ed6f6743db076c858eef137916d28ba5f7 (patch)
tree0506bda15f205227de26056f8f550aef67b74d51 /plugins
parent756a7972fea127c56467c8f55fef77337af6532f (diff)
downloadcdo-0f2188ed6f6743db076c858eef137916d28ba5f7.tar.gz
cdo-0f2188ed6f6743db076c858eef137916d28ba5f7.tar.xz
cdo-0f2188ed6f6743db076c858eef137916d28ba5f7.zip
enhance ValidationContext
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.emf.cdo.ui.efs/src/org/eclipse/emf/cdo/ui/efs/wizards/CDOProjectImportWizard.java2
-rw-r--r--plugins/org.eclipse.net4j.ui/src/org/eclipse/net4j/internal/ui/container/TCPConnectorWizard.java6
-rw-r--r--plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/container/IElementWizard.java8
3 files changed, 9 insertions, 7 deletions
diff --git a/plugins/org.eclipse.emf.cdo.ui.efs/src/org/eclipse/emf/cdo/ui/efs/wizards/CDOProjectImportWizard.java b/plugins/org.eclipse.emf.cdo.ui.efs/src/org/eclipse/emf/cdo/ui/efs/wizards/CDOProjectImportWizard.java
index 4abc06aef2..98b15ebe7d 100644
--- a/plugins/org.eclipse.emf.cdo.ui.efs/src/org/eclipse/emf/cdo/ui/efs/wizards/CDOProjectImportWizard.java
+++ b/plugins/org.eclipse.emf.cdo.ui.efs/src/org/eclipse/emf/cdo/ui/efs/wizards/CDOProjectImportWizard.java
@@ -45,7 +45,7 @@ public class CDOProjectImportWizard extends Wizard implements IImportWizard
*/
public static class Page extends WizardPage implements ValidationContext
{
- protected Page()
+ public Page()
{
super("CDOProjectImportWizardPage");
}
diff --git a/plugins/org.eclipse.net4j.ui/src/org/eclipse/net4j/internal/ui/container/TCPConnectorWizard.java b/plugins/org.eclipse.net4j.ui/src/org/eclipse/net4j/internal/ui/container/TCPConnectorWizard.java
index 414b52f489..cc5734d49c 100644
--- a/plugins/org.eclipse.net4j.ui/src/org/eclipse/net4j/internal/ui/container/TCPConnectorWizard.java
+++ b/plugins/org.eclipse.net4j.ui/src/org/eclipse/net4j/internal/ui/container/TCPConnectorWizard.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Eike Stepper - initial API and implementation
* Martin Fluegge - initial API and implementation
@@ -51,7 +51,7 @@ public class TCPConnectorWizard extends ElementWizard implements ModifyListener
String host = hostText.getText();
if (host.length() == 0)
{
- setErrorMessage("Host name is empty.");
+ setValidationError(hostText, "Host name is empty.");
return;
}
@@ -62,7 +62,7 @@ public class TCPConnectorWizard extends ElementWizard implements ModifyListener
}
setResultDescription(host);
- setErrorMessage(null);
+ setValidationOK();
}
/**
diff --git a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/container/IElementWizard.java b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/container/IElementWizard.java
index 25f227f53a..921a76562c 100644
--- a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/container/IElementWizard.java
+++ b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/container/IElementWizard.java
@@ -11,6 +11,7 @@
package org.eclipse.net4j.util.ui.container;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
/**
* @author Eike Stepper
@@ -20,14 +21,15 @@ public interface IElementWizard
{
public String getResultDescription();
- public void create(Composite parent, String factoryType, String defaultDescription,
- ValidationContext validationContext);
+ public void create(Composite parent, String factoryType, String defaultDescription, ValidationContext context);
/**
* @author Eike Stepper
*/
public interface ValidationContext
{
- public void setErrorMessage(String message);
+ public void setValidationOK();
+
+ public void setValidationError(Control control, String message);
}
}

Back to the top