use of org.drools.workbench.models.datamodel.rule.visitors.ToStringExpressionVisitor in project drools by kiegroup.
the class GeneratorContextRuleModelVisitor method visitFromCompositeFactPattern.
private void visitFromCompositeFactPattern(final FromCompositeFactPattern pattern) {
visit(pattern.getFactPattern());
ToStringExpressionVisitor visitor = new ToStringExpressionVisitor();
parseStringPattern(pattern.getExpression().getText(visitor));
}
use of org.drools.workbench.models.datamodel.rule.visitors.ToStringExpressionVisitor 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