/**
* @param con The constraint being edited.
*/
public ConstraintValueEditor(FactPattern pattern, String fieldName, ISingleFieldConstraint con, RuleModeller modeller, String valueType /* eg is numeric */) {
this.constraint = con;
SuggestionCompletionEngine sce = modeller.getSuggestionCompletions();
if ( SuggestionCompletionEngine.TYPE_NUMERIC.equals(valueType)) {
this.numericValue = true;
} else {
this.numericValue = false;
}
if (SuggestionCompletionEngine.TYPE_BOOLEAN.equals(valueType)) {
this.dropDownData = DropDownData.create(new String[] {"true", "false" }); //NON-NLS
} else {
this.dropDownData = sce.getEnums(pattern, fieldName);
}
this.model = modeller.getModel();