Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Schindl2016-04-12 19:29:33 +0000
committerTom Schindl2016-04-12 19:29:33 +0000
commit2a5cca72f2f4faad2d026f7bfde0c35e02bb4674 (patch)
tree87142034c5f87734d6801b3837aea5a40f391576
parentf1eed1cde4e2c9f118cc388effbefabfe67f1248 (diff)
downloadorg.eclipse.efxclipse-2a5cca72f2f4faad2d026f7bfde0c35e02bb4674.tar.gz
org.eclipse.efxclipse-2a5cca72f2f4faad2d026f7bfde0c35e02bb4674.tar.xz
org.eclipse.efxclipse-2a5cca72f2f4faad2d026f7bfde0c35e02bb4674.zip
Bug 491535 - Add a validation story who is application to mvvm
-rw-r--r--bundles/runtime/org.eclipse.fx.core/src/org/eclipse/fx/core/property/ValidatedProperty.java12
-rw-r--r--bundles/runtime/org.eclipse.fx.core/src/org/eclipse/fx/core/property/ValidatedPropertyBase.java10
2 files changed, 11 insertions, 11 deletions
diff --git a/bundles/runtime/org.eclipse.fx.core/src/org/eclipse/fx/core/property/ValidatedProperty.java b/bundles/runtime/org.eclipse.fx.core/src/org/eclipse/fx/core/property/ValidatedProperty.java
index 11fbac47a..ca5945f0f 100644
--- a/bundles/runtime/org.eclipse.fx.core/src/org/eclipse/fx/core/property/ValidatedProperty.java
+++ b/bundles/runtime/org.eclipse.fx.core/src/org/eclipse/fx/core/property/ValidatedProperty.java
@@ -38,7 +38,7 @@ public interface ValidatedProperty<O> extends ValidationStatusPropertyOwner {
* the validator function
* @return the subscription to remove the validator
*/
- public Subscription validator(Function<O, Status> validator);
+ public Subscription registerValidator(Function<O, Status> validator);
/**
* Register a validator who is also use the values from dependent
@@ -48,7 +48,7 @@ public interface ValidatedProperty<O> extends ValidationStatusPropertyOwner {
* the validator
* @return the subscription to remove the validator
*/
- public Subscription validator(BiFunction<O, Map<String, Object>, Status> validator);
+ public Subscription registerValidator(BiFunction<O, Map<String, Object>, Status> validator);
/**
* Register a dependent validated property
@@ -57,7 +57,7 @@ public interface ValidatedProperty<O> extends ValidationStatusPropertyOwner {
* the property
* @return the subscription to remove the dependency
*/
- public Subscription dependency(ValidatedPropertyBase<?> property);
+ public Subscription registerDependency(ValidatedPropertyBase<?> property);
/**
* Register a dependent property
@@ -66,14 +66,14 @@ public interface ValidatedProperty<O> extends ValidationStatusPropertyOwner {
* the property
* @return the subscription to remove the dependency
*/
- public Subscription dependency(Property<?> property);
+ public Subscription registerDependency(Property<?> property);
/**
* Register a dependent validated property
*
* @param name
* the name used when build the map for
- * {@link ValidatedPropertyBase#validator(BiFunction)}
+ * {@link ValidatedPropertyBase#registerValidator(BiFunction)}
* @param property
* the property
* @return the subscription to remove the dependency
@@ -85,7 +85,7 @@ public interface ValidatedProperty<O> extends ValidationStatusPropertyOwner {
*
* @param name
* the name used when build the map for
- * {@link ValidatedPropertyBase#validator(BiFunction)}
+ * {@link ValidatedPropertyBase#registerValidator(BiFunction)}
* @param property
* the property
* @return the subscription to remove the dependency
diff --git a/bundles/runtime/org.eclipse.fx.core/src/org/eclipse/fx/core/property/ValidatedPropertyBase.java b/bundles/runtime/org.eclipse.fx.core/src/org/eclipse/fx/core/property/ValidatedPropertyBase.java
index 3a6dfb76b..5b461a677 100644
--- a/bundles/runtime/org.eclipse.fx.core/src/org/eclipse/fx/core/property/ValidatedPropertyBase.java
+++ b/bundles/runtime/org.eclipse.fx.core/src/org/eclipse/fx/core/property/ValidatedPropertyBase.java
@@ -78,12 +78,12 @@ public abstract class ValidatedPropertyBase<O> implements ValidatedProperty<O> {
}
@Override
- public Subscription validator(Function<O, Status> validator) {
- return validator((t, dep) -> validator.apply(t));
+ public Subscription registerValidator(Function<O, Status> validator) {
+ return registerValidator((t, dep) -> validator.apply(t));
}
@Override
- public Subscription validator(BiFunction<O, Map<String, Object>, Status> validator) {
+ public Subscription registerValidator(BiFunction<O, Map<String, Object>, Status> validator) {
this.validationList.add(validator);
return () -> {
this.validationList.remove(validator);
@@ -92,12 +92,12 @@ public abstract class ValidatedPropertyBase<O> implements ValidatedProperty<O> {
}
@Override
- public Subscription dependency(ValidatedPropertyBase<?> property) {
+ public Subscription registerDependency(ValidatedPropertyBase<?> property) {
return dependency(property.domainProperty.getName(), property);
}
@Override
- public Subscription dependency(Property<?> property) {
+ public Subscription registerDependency(Property<?> property) {
return dependency(property.getName(), property);
}

Back to the top