Examples of ExpressionText


Examples of org.drools.ide.common.client.modeldriven.brl.ExpressionText

            if ( "size".equals( value ) ) {
                expression.appendPart( new ExpressionMethod( "size",
                                                             "int",
                                                             SuggestionCompletionEngine.TYPE_NUMERIC ) );
            } else if ( "isEmpty".equals( value ) ) {
                expression.appendPart( new ExpressionText( ".size() == 0",
                                                           "",
                                                           SuggestionCompletionEngine.TYPE_NUMERIC ) );
            }
        } else {
            int dotPos = value.indexOf( '.' );
View Full Code Here

Examples of org.drools.ide.common.client.modeldriven.brl.ExpressionText

                collectionIndex = new ExpressionCollectionIndex("get", getCurrentParametricType(), factName);
            } else {
                collectionIndex = new ExpressionCollectionIndex("get", "java.lang.Object", SuggestionCompletionEngine.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", SuggestionCompletionEngine.TYPE_NUMERIC));
                index.appendPart(new ExpressionText("-1"));

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

Examples of org.drools.ide.common.client.modeldriven.brl.ExpressionText

            onCollectionChange(value);
        } else if (SuggestionCompletionEngine.TYPE_STRING.equals(getCurrentGenericType())) {
            if ("size".equals(value)) {
                expression.appendPart(new ExpressionMethod("size", "int", SuggestionCompletionEngine.TYPE_NUMERIC));
            } else if ("isEmpty".equals(value)) {
                expression.appendPart(new ExpressionText(".size() == 0", "", SuggestionCompletionEngine.TYPE_NUMERIC));
            }
        } else {
            int dotPos = value.indexOf('.');
            String prefix = value.substring(0, dotPos);
            String attrib = value.substring(dotPos + 1);
View Full Code Here

Examples of org.drools.ide.common.client.modeldriven.brl.ExpressionText

      } else {
        collectionIndex = new ExpressionCollectionIndex("get", "java.lang.Object",
            SuggestionCompletionEngine.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", SuggestionCompletionEngine.TYPE_NUMERIC));
        index.appendPart(new ExpressionText("-1"));

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

Examples of org.drools.ide.common.client.modeldriven.brl.ExpressionText

      onCollectionChange(value);
    } else if (SuggestionCompletionEngine.TYPE_STRING.equals(getCurrentGenericType())) {
      if ("size".equals(value)) {
        expression.appendPart(new ExpressionMethod("size", "int", SuggestionCompletionEngine.TYPE_NUMERIC));
      } else if ("isEmpty".equals(value)) {
        expression.appendPart(new ExpressionText(".size() == 0", "", SuggestionCompletionEngine.TYPE_NUMERIC));
      }
    } else {
      int dotPos = value.indexOf('.');
      String prefix = value.substring(0, dotPos);
      String attrib = value.substring(dotPos + 1);
View Full Code Here

Examples of org.drools.ide.common.client.modeldriven.brl.ExpressionText

                                                                 "java.lang.Object",
                                                                 SuggestionCompletionEngine.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",
                                                        SuggestionCompletionEngine.TYPE_NUMERIC_INTEGER ) );
                index.appendPart( new ExpressionText( "-1" ) );

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

Examples of org.drools.ide.common.client.modeldriven.brl.ExpressionText

            if ( "size".equals( value ) ) {
                expression.appendPart( new ExpressionMethod( "size",
                                                             "int",
                                                             SuggestionCompletionEngine.TYPE_NUMERIC_INTEGER ) );
            } else if ( "isEmpty".equals( value ) ) {
                expression.appendPart( new ExpressionText( ".size() == 0",
                                                           "",
                                                           SuggestionCompletionEngine.TYPE_NUMERIC_INTEGER ) );
            }
        } else {
            int dotPos = value.indexOf( '.' );
View Full Code Here

Examples of org.drools.ide.common.client.modeldriven.brl.ExpressionText

        RuleModel m = new RuleModel();
        m.name = "test expressionsString1";

        FactPattern p = new FactPattern( "Person" );
        SingleFieldConstraintEBLeftSide con = new SingleFieldConstraintEBLeftSide();
        con.getExpressionLeftSide().appendPart( new ExpressionText( "field1" ) );
        con.setOperator( "==" );
        con.setValue( "goo" );
        con.setConstraintValueType( SingleFieldConstraint.TYPE_LITERAL );
        p.addConstraint( con );
View Full Code Here

Examples of org.drools.ide.common.client.modeldriven.brl.ExpressionText

    fp.boundName = "$o";
    efl.appendPart(new ExpressionVariable(fp));
    ExpressionMethod em = new ExpressionMethod("aMethod", "aClass", "aType");
   
    ExpressionFormLine param = new ExpressionFormLine();
    param.appendPart(new ExpressionText("\"hello world\""));
    em.putParam("hi", param);
   
    efl.appendPart(em);
   
   
View Full Code Here

Examples of org.drools.ide.common.client.modeldriven.brl.ExpressionText

                                                                 "java.lang.Object",
                                                                 SuggestionCompletionEngine.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",
                                                        SuggestionCompletionEngine.TYPE_NUMERIC ) );
                index.appendPart( new ExpressionText( "-1" ) );

                collectionIndex.putParam( "index",
                                          index );
                expression.appendPart( collectionIndex );
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.