use of org.drools.workbench.models.datamodel.rule.builder.DRLConstraintValueBuilder in project drools-wb by kiegroup.
the class FactPatternWidget method expressionBuilderLS.
private HorizontalPanel expressionBuilderLS(final SingleFieldConstraintEBLeftSide con, boolean showBinding) {
HorizontalPanel ab = new HorizontalPanel();
ab.setStyleName("modeller-field-Label");
if (!con.isBound()) {
if (bindable && showBinding && !this.readOnly) {
ab.add(new ExpressionBuilder(getModeller(), getEventBus(), con.getExpressionLeftSide()));
} else {
final DRLConstraintValueBuilder constraintValueBuilder = DRLConstraintValueBuilder.getBuilder(getRuleDialect());
final ToStringExpressionVisitor visitor = new ToStringExpressionVisitor(constraintValueBuilder);
ab.add(new SmallLabel(con.getExpressionLeftSide().getText(visitor)));
}
} else {
ab.add(new ExpressionBuilder(getModeller(), getEventBus(), con.getExpressionLeftSide()));
}
return ab;
}
Aggregations