Package org.drools.workbench.models.datamodel.rule

Examples of org.drools.workbench.models.datamodel.rule.ExpressionFormLine$ToStringVisitor


        ebBtn.addClickHandler( new ClickHandler() {
            public void onClick( ClickEvent event ) {
                SingleFieldConstraintEBLeftSide con = new SingleFieldConstraintEBLeftSide();
                con.setConstraintValueType( SingleFieldConstraint.TYPE_UNDEFINED );
                con.setExpressionLeftSide( new ExpressionFormLine( new ExpressionUnboundFact( pattern ) ) );
                hasConstraints.addConstraint( con );
                modeller.refreshWidget();
                popup.hide();
            }
        } );
View Full Code Here


            ebBtn.addClickHandler( new ClickHandler() {
                public void onClick( ClickEvent event ) {
                    SingleFieldConstraintEBLeftSide con = new SingleFieldConstraintEBLeftSide();
                    con.setConstraintValueType( SingleFieldConstraint.TYPE_UNDEFINED );
                    fp.addConstraint( con );
                    con.setExpressionLeftSide( new ExpressionFormLine( new ExpressionUnboundFact( pattern ) ) );
                    modeller.refreshWidget();
                    popup.hide();
                }
            } );
            popup.addAttribute( GuidedRuleEditorResources.CONSTANTS.ExpressionEditor(),
View Full Code Here

                //Reset Constraint's value and value type
                if ( Window.confirm( GuidedRuleEditorResources.CONSTANTS.RemoveConstraintValueDefinitionQuestion() ) ) {
                    constraint.setConstraintValueType( BaseSingleFieldConstraint.TYPE_UNDEFINED );
                    constraint.setValue( null );
                    constraint.clearParameters();
                    constraint.setExpressionValue( new ExpressionFormLine() );
                    doTypeChosen();
                }
            }

        } );
View Full Code Here

                                                                                            mi.getGenericType(),
                                                                                            mi.getParametricReturnType() );
                                          //Add applicable parameters
                                          for ( int index = 0; index < mi.getParams().size(); index++ ) {
                                              final String paramDataType = mi.getParams().get( index );
                                              final ExpressionFormLine param = new ExpressionFormLine( index );
                                              param.appendPart( new ExpressionMethodParameter( "",
                                                                                               paramDataType,
                                                                                               paramDataType ) );
                                              em.putParam( paramDataType,
                                                           param );
                                          }
View Full Code Here

                container.add( new Label( expressionPart.getName() ) );
                container.add( new Label( "(" ) );
                final ExpressionMethod em = (ExpressionMethod) expressionPart;
                final List<ExpressionFormLine> emParams = em.getOrderedParams();
                for ( int index = 0; index < emParams.size(); index++ ) {
                    final ExpressionFormLine paramValueHolder = emParams.get( index );
                    final String paramDataType = em.getParameterDataType( paramValueHolder );
                    final ExpressionMethodParameter paramValue = ( (ExpressionMethodParameter) paramValueHolder.getRootExpression() );
                    final TextBox paramValueEditor = TextBoxFactory.getTextBox( paramDataType );
                    paramValueEditor.addValueChangeHandler( new ValueChangeHandler<String>() {
                        @Override
                        public void onValueChange( ValueChangeEvent<String> event ) {
                            paramValue.setText( event.getValue() );
View Full Code Here

        constraint.setOperator( "!=" );
        pattern.addConstraint( constraint );

        FromCompositeFactPattern fromCompositeFactPattern = new FromCompositeFactPattern();
        fromCompositeFactPattern.setFactPattern( pattern );
        ExpressionFormLine expression = new ExpressionFormLine();
        expression.setBinding( "person.addresses" );
        fromCompositeFactPattern.setExpression( expression );

        model.lhs = new IPattern[]{ boundPattern, fromCompositeFactPattern };

        assertFalse( validator.isValid() );
View Full Code Here

        SingleFieldConstraint constraint = new SingleFieldConstraint( "street" );
        pattern.addConstraint( constraint );

        FromCompositeFactPattern fromCompositeFactPattern = new FromCompositeFactPattern();
        fromCompositeFactPattern.setFactPattern( pattern );
        ExpressionFormLine expression = new ExpressionFormLine();
        expression.setBinding( "person.addresses" );
        fromCompositeFactPattern.setExpression( expression );

        model.lhs = new IPattern[]{ boundPattern, fromCompositeFactPattern };

        assertTrue( validator.isValid() );
View Full Code Here

        FactPattern factPattern = new FactPattern( "SomeList" );
        factPattern.setBoundName( "list" );

        FromCompositeFactPattern fromCompositeFactPattern = new FromCompositeFactPattern();
        fromCompositeFactPattern.setFactPattern( new FactPattern( "Person" ) );
        ExpressionFormLine expression = new ExpressionFormLine();
        expression.appendPart( new ExpressionVariable( "list", "SomeList", "SomeList" ) );
        fromCompositeFactPattern.setExpression( expression );
        model.lhs = new IPattern[]{ fromCompositeFactPattern };

        assertTrue( validator.isValid() );
    }
View Full Code Here

        SingleFieldConstraint constraint = new SingleFieldConstraint( "street" );
        pattern.addConstraint( constraint );

        FromCompositeFactPattern fromCompositeFactPattern = new FromCompositeFactPattern();
        fromCompositeFactPattern.setFactPattern( pattern );
        ExpressionFormLine expression = new ExpressionFormLine();
        fromCompositeFactPattern.setExpression( expression );

        model.lhs = new IPattern[]{ fromCompositeFactPattern };

        assertFalse( validator.isValid() );
View Full Code Here

        pattern2.addConstraint( constraint2 );

        FromAccumulateCompositeFactPattern fromAccumulateCompositeFactPattern = new FromAccumulateCompositeFactPattern();
        fromAccumulateCompositeFactPattern.setSourcePattern( pattern1 );
        fromAccumulateCompositeFactPattern.setFactPattern( pattern2 );
        ExpressionFormLine expression = new ExpressionFormLine();
        expression.setBinding( "person.addresses" );
        fromAccumulateCompositeFactPattern.setExpression( expression );

        model.lhs = new IPattern[]{ fromAccumulateCompositeFactPattern };

        assertTrue( validator.isValid() );
View Full Code Here

TOP

Related Classes of org.drools.workbench.models.datamodel.rule.ExpressionFormLine$ToStringVisitor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.