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

Examples of org.drools.workbench.models.datamodel.rule.ExpressionText


                    expression.appendPart( new ExpressionMethod( currentMethodInfo.getName(),
                                                                 currentMethodInfo.getReturnClassType(),
                                                                 currentMethodInfo.getGenericType(),
                                                                 currentMethodInfo.getParametricReturnType() ) );
                } else {
                    expression.appendPart( new ExpressionText( expressionPart ) );
                }

            } else if ( "Collection".equals( currentField.getType() ) ) {
                expression.appendPart( new ExpressionCollection( expressionPart,
                                                                 currentField.getClassName(),
View Full Code Here


        if ( DELETE_VALUE.equals( value ) ) {
            expression.removeLast();
            onChangeSelectionUpdateExpressionWidget( oldType );

        } else if ( TEXT_VALUE.equals( value ) ) {
            expression.appendPart( new ExpressionText( "" ) );
            onChangeSelectionUpdateExpressionWidget( oldType );

        } else {
            int dotPos = value.indexOf( '.' );
            String prefix = value.substring( 0,
View Full Code Here

                container.add( new Label( ")" ) );
            } else if ( !( expressionPart instanceof ExpressionText ) ) {
                container.add( new Label( expressionPart.getName() ) );
            } else {
                final TextBox tb = new TextBox();
                final ExpressionText expressionTextPart = (ExpressionText) expressionPart;
                tb.setText( expressionTextPart.getName() );
                tb.addChangeHandler( new ChangeHandler() {
                    @Override
                    public void onChange( final ChangeEvent changeEvent ) {
                        expressionTextPart.setText( tb.getText() );
                        modeller.makeDirty();
                    }
                } );
                container.add( tb );
            }
View Full Code Here

                                                                 "java.lang.Object",
                                                                 DataType.TYPE_OBJECT );
            }
            if ( "first".equals( value ) ) {
                collectionIndex.putParam( "index",
                                          new ExpressionFormLine( new ExpressionText( "0" ) ) );
                expression.appendPart( collectionIndex );
            } else if ( "last".equals( value ) ) {
                ExpressionFormLine index = new ExpressionFormLine( expression );
                index.appendPart( new ExpressionMethod( "size",
                                                        "int",
                                                        DataType.TYPE_NUMERIC_INTEGER ) );
                index.appendPart( new ExpressionText( "-1" ) );

                collectionIndex.putParam( "index",
                                          index );
                expression.appendPart( collectionIndex );
            }
View Full Code Here

            if ( "size".equals( value ) ) {
                expression.appendPart( new ExpressionMethod( "size",
                                                             "int",
                                                             DataType.TYPE_NUMERIC_INTEGER ) );
            } else if ( "isEmpty".equals( value ) ) {
                expression.appendPart( new ExpressionText( ".size() == 0",
                                                           "",
                                                           DataType.TYPE_NUMERIC_INTEGER ) );
            }
            onChangeSelectionUpdateExpressionWidget( oldType );
View Full Code Here

        add( method );
        moveNext( part );
    }

    public void visit( ExpressionText part ) {
        add( new ExpressionText( part.getName(),
                                 part.getClassType(),
                                 part.getGenericType() ) );
        moveNext( part );
    }
View Full Code Here

        if ( DELETE_VALUE.equals( value ) ) {
            expression.removeLast();
            onChangeSelectionUpdateExpressionWidget( oldType );

        } else if ( TEXT_VALUE.equals( value ) ) {
            expression.appendPart( new ExpressionText( "" ) );
            onChangeSelectionUpdateExpressionWidget( oldType );

        } else {
            int dotPos = value.indexOf( '.' );
            String prefix = value.substring( 0,
View Full Code Here

                continue;
            } else if ( !( expressionPart instanceof ExpressionText ) || this.readOnly ) {
                container.add( new Label( expressionPart.getName() ) );
            } else {
                final TextBox tb = new TextBox();
                final ExpressionText expressionTextPart = (ExpressionText) expressionPart;
                tb.setText( expressionTextPart.getName() );
                tb.addChangeHandler( new ChangeHandler() {
                    @Override
                    public void onChange( final ChangeEvent changeEvent ) {
                        expressionTextPart.setName( tb.getText() );
                        modeller.makeDirty();
                    }
                } );
                container.add( tb );
            }
View Full Code Here

        if ( DELETE_VALUE.equals( value ) ) {
            expression.removeLast();
            onChangeSelectionUpdateExpressionWidget( oldType );

        } else if ( TEXT_VALUE.equals( value ) ) {
            expression.appendPart( new ExpressionText( "" ) );
            onChangeSelectionUpdateExpressionWidget( oldType );

        } else {
            int dotPos = value.indexOf( '.' );
            String prefix = value.substring( 0,
View Full Code Here

                container.add( new Label( ")" ) );
            } else if ( !( expressionPart instanceof ExpressionText ) ) {
                container.add( new Label( expressionPart.getName() ) );
            } else {
                final TextBox tb = new TextBox();
                final ExpressionText expressionTextPart = (ExpressionText) expressionPart;
                tb.setText( expressionTextPart.getName() );
                tb.addChangeHandler( new ChangeHandler() {
                    @Override
                    public void onChange( final ChangeEvent changeEvent ) {
                        expressionTextPart.setText( tb.getText() );
                        modeller.makeDirty();
                    }
                } );
                container.add( tb );
            }
View Full Code Here

TOP

Related Classes of org.drools.workbench.models.datamodel.rule.ExpressionText

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.