Package org.drools.ide.common.client.modeldriven.brl

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


            public void onClick(ClickEvent event) {
                Widget sender = (Widget) event.getSource();
                if ( sender == fromBtn ) {
                    pattern.addFactPattern(
                            new FromCompositeFactPattern() );
                } else if ( sender == fromAccumulateBtn ) {
                    pattern.addFactPattern(
                            new FromAccumulateCompositeFactPattern() );
                } else if ( sender == fromCollectBtn ) {
                    pattern.addFactPattern(
View Full Code Here


        ClickHandler btnsClickHandler = new ClickHandler() {
     
      public void onClick(ClickEvent event) {
        Widget sender = (Widget)event.getSource();
                if (sender == fromBtn) {
                    getFromCollectPattern().setRightPattern(new FromCompositeFactPattern());
                } else if (sender == fromAccumulateBtn) {
                    getFromCollectPattern().setRightPattern(new FromAccumulateCompositeFactPattern());
                } else if (sender == fromCollectBtn) {
                    getFromCollectPattern().setRightPattern(new FromCollectCompositeFactPattern());
                } else if (sender == freeFormDRLBtn) {
View Full Code Here

        refreshWidget();
    }

    protected void addNewFCE(String type,
                             int position) {
        FromCompositeFactPattern p = null;
        if ( type.equals( "from" ) ) {
            p = new FromCompositeFactPattern();
        } else if ( type.equals( "from accumulate" ) ) {
            p = new FromAccumulateCompositeFactPattern();
        } else if ( type.equals( "from collect" ) ) {
            p = new FromCollectCompositeFactPattern();
        }
View Full Code Here

      public void onClick(ClickEvent event) {
        Widget sender = (Widget) event.getSource();
        if (sender == fromBtn) {
          pattern.addFactPattern(
              new FromCompositeFactPattern());
        } else if (sender == fromAccumulateBtn) {
          pattern.addFactPattern(
              new FromAccumulateCompositeFactPattern());
        } else if (sender == fromCollectBtn) {
          pattern.addFactPattern(
View Full Code Here

      public void onClick(ClickEvent event) {
        Widget sender = (Widget) event.getSource();
        if (sender == fromBtn) {
          getFromAccumulatePattern().setSourcePattern(
              new FromCompositeFactPattern());
        } else if (sender == fromAccumulateBtn) {
          getFromAccumulatePattern().setSourcePattern(
              new FromAccumulateCompositeFactPattern());
        } else if (sender == fromCollectBtn) {
          getFromAccumulatePattern().setSourcePattern(
View Full Code Here

                               position );
    }

    private void addNewFCE(String type,
                             int position) {
        FromCompositeFactPattern p = null;
        if ( type.equals( "from" ) ) {
            p = new FromCompositeFactPattern();
        } else if ( type.equals( "from accumulate" ) ) {
            p = new FromAccumulateCompositeFactPattern();
        } else if ( type.equals( "from collect" ) ) {
            p = new FromCollectCompositeFactPattern();
        } else if ( type.equals( "from entry-point" ) ) {
View Full Code Here

            public void onClick(ClickEvent event) {
                Widget sender = (Widget) event.getSource();
                if ( sender == fromBtn ) {
                    pattern.addFactPattern(
                            new FromCompositeFactPattern() );
                } else if ( sender == fromAccumulateBtn ) {
                    pattern.addFactPattern(
                            new FromAccumulateCompositeFactPattern() );
                } else if ( sender == fromCollectBtn ) {
                    pattern.addFactPattern(
View Full Code Here

        ClickHandler btnsClickHandler = new ClickHandler() {

            public void onClick(ClickEvent event) {
                Widget sender = (Widget)event.getSource();
                if (sender == fromBtn) {
                    getFromCollectPattern().setRightPattern(new FromCompositeFactPattern());
                } else if (sender == fromAccumulateBtn) {
                    getFromCollectPattern().setRightPattern(new FromAccumulateCompositeFactPattern());
                } else if (sender == fromCollectBtn) {
                    getFromCollectPattern().setRightPattern(new FromCollectCompositeFactPattern());
                } else if (sender == freeFormDRLBtn) {
View Full Code Here

        clone.setRightPattern( (IPattern) visit( pattern.getRightPattern() ) );
        return clone;
    }

    private FromCompositeFactPattern visitFromCompositeFactPattern(FromCompositeFactPattern pattern) {
        FromCompositeFactPattern clone = new FromCompositeFactPattern();
        clone.setExpression( (ExpressionFormLine) visit( pattern.getExpression() ) );
        clone.setFactPattern( (FactPattern) visit( pattern.getFactPattern() ) );
        return clone;
    }
View Full Code Here

        m.addLhsItem( fp1 );

        final CompositeFactPattern cp = new CompositeFactPattern( CompositeFactPattern.COMPOSITE_TYPE_NOT );

        final FactPattern fp2 = new FactPattern( "Person" );
        final FromCompositeFactPattern ffp1 = new FromCompositeFactPattern();
        ffp1.setExpression( new ExpressionFormLine( new ExpressionVariable( fp1 ) ) );
        ffp1.setFactPattern( fp2 );
        cp.addFactPattern( ffp1 );
        m.addLhsItem( cp );

        final String actual = BRDRLPersistence.getInstance().marshal( m );
        final String expected = "rule \"model\"\n" +
View Full Code Here

TOP

Related Classes of org.drools.ide.common.client.modeldriven.brl.FromCompositeFactPattern

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.