addbutton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
String name = consDefsCombo.getItemText(consDefsCombo.getSelectedIndex());
ConstraintConfiguration config = ConstraintsContainer.getEmptyConfiguration(name);
if (config != null) {
String factName = factsCombo.getItemText( factsCombo.getSelectedIndex() );
String fieldName = fieldsCombo.getItemText( fieldsCombo.getSelectedIndex() );
config.setFactType( factName );
config.setFieldName( fieldName );
if ( ((WorkingSetConfigData) workingSet.getContent()).constraints == null ) {
((WorkingSetConfigData) workingSet.getContent()).constraints = new ArrayList<ConstraintConfiguration>();
}
((WorkingSetConfigData) workingSet.getContent()).constraints.add( config );
constraintsCombo.addItem( config.getConstraintName(),
addContrainsMap( config ) );
workingSetEditor.getConstraintsConstrainer().addConstraint( config );
}
pop.hide();