Author: elvisisking
Date: 2012-05-31 13:13:54 -0400 (Thu, 31 May 2012)
New Revision: 41585
Modified:
trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr.ui/src/org/jboss/tools/modeshape/jcr/ui/cnd/PropertyDialog.java
Log:
JBIDE-12056 Exception Adding/Editing Property Definition's Value Constraint In CND
Editor. Fixed same issue with add/editing default values.
Modified:
trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr.ui/src/org/jboss/tools/modeshape/jcr/ui/cnd/PropertyDialog.java
===================================================================
---
trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr.ui/src/org/jboss/tools/modeshape/jcr/ui/cnd/PropertyDialog.java 2012-05-31
16:47:55 UTC (rev 41584)
+++
trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr.ui/src/org/jboss/tools/modeshape/jcr/ui/cnd/PropertyDialog.java 2012-05-31
17:13:54 UTC (rev 41585)
@@ -1135,8 +1135,12 @@
// check for duplicate
currentDefaultValues.add(newValue);
- return CndValidator.validateDefaultValues(propDefn.getName(),
propDefn.getType(), currentDefaultValues,
-
accessExistingNamespacePrefixes());
+ MultiValidationStatus validationStatus =
CndValidator.validateDefaultValues(propDefn.getName(),
+
propDefn.getType(),
+
currentDefaultValues,
+
accessExistingNamespacePrefixes());
+ currentDefaultValues.remove(newValue);
+ return validationStatus;
}
};
@@ -1192,7 +1196,8 @@
// check for duplicate
currentConstraints.add(newValue);
- MultiValidationStatus validationStatus =
CndValidator.validateValueConstraints(propDefn.getName(), currentConstraints);
+ MultiValidationStatus validationStatus =
CndValidator.validateValueConstraints(propDefn.getName(),
+
currentConstraints);
currentConstraints.remove(newValue);
return validationStatus;
}
@@ -1304,8 +1309,12 @@
// check for duplicate
currentDefaultValues.add(newValue);
- return CndValidator.validateDefaultValues(propDefn.getName(),
propDefn.getType(), currentDefaultValues,
-
accessExistingNamespacePrefixes());
+ MultiValidationStatus validationStatus =
CndValidator.validateDefaultValues(propDefn.getName(),
+
propDefn.getType(),
+
currentDefaultValues,
+
accessExistingNamespacePrefixes());
+ currentDefaultValues.remove(newValue);
+ return validationStatus;
}
};
@@ -1381,7 +1390,10 @@
// check for duplicate
currentConstraints.add(newValue);
- return CndValidator.validateValueConstraints(propDefn.getName(),
currentConstraints);
+ MultiValidationStatus validationStatus =
CndValidator.validateValueConstraints(propDefn.getName(),
+
currentConstraints);
+ currentConstraints.remove(newValue);
+ return validationStatus;
}
};
Show replies by date