use of org.drools.workbench.screens.guided.rule.client.editor.util.SuperTypeMatcher in project drools-wb by kiegroup.
the class MethodParameterValueEditor method canTheVariableButtonBeShown.
private void canTheVariableButtonBeShown(final Callback<Boolean> callback) {
List<String> factTypes = new ArrayList<String>();
for (String variable : modeller.getModel().getAllVariables()) {
String factType = getFactType(variable);
factTypes.add(factType);
if (factType.equals(this.parameterType)) {
callback.callback(true);
return;
}
}
new SuperTypeMatcher(oracle).isThereAMatchingSuperType(factTypes, parameterType, callback);
}
use of org.drools.workbench.screens.guided.rule.client.editor.util.SuperTypeMatcher in project drools-wb by kiegroup.
the class MethodParameterValueEditor method boundVariable.
private ListBox boundVariable() {
BoundListBox boundListBox = new BoundListBox(modeller, methodParameter, new SuperTypeMatcher(oracle));
boundListBox.addChangeHandler(new ChangeHandler() {
public void onChange(ChangeEvent event) {
ListBox w = (ListBox) event.getSource();
setMethodParameterValue(w.getValue(w.getSelectedIndex()));
refresh();
}
});
return boundListBox;
}
Aggregations