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

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


                                 "GLOBCOL" + glob + var );
                cmds.put( "GLOBCOL" + glob + var,
                          new Command() {

                              public void execute() {
                                  ActionGlobalCollectionAdd gca = new ActionGlobalCollectionAdd();
                                  gca.setGlobalName( glob );
                                  gca.setFactName( var );
                                  model.addRhsItem( gca,
                                                    Integer.parseInt( positionCbo.getValue( positionCbo.getSelectedIndex() ) ) );
                                  hide();
                              }
                          } );
View Full Code Here


                                                           lineCounter );
                                setters.add( line );
                            } else if ( methodName.equals( "add" ) && expandedDRLInfo.hasGlobal( variable ) ) {
                                String factName = line.substring( argStart + 1,
                                                                  line.lastIndexOf( ')' ) ).trim();
                                ActionGlobalCollectionAdd actionGlobalCollectionAdd = new ActionGlobalCollectionAdd();
                                actionGlobalCollectionAdd.setGlobalName( variable );
                                actionGlobalCollectionAdd.setFactName( factName );
                                m.addRhsItem( actionGlobalCollectionAdd );
                            } else {
                                m.addRhsItem( getActionCallMethod( m,
                                                                   isJavaDialect,
                                                                   boundParams,
View Full Code Here

                                }
                                setStatementsPosition.put( variable, lineCounter );
                                setters.add( line );
                            } else if ( methodName.equals( "add" ) && expandedDRLInfo.hasGlobal( variable ) ) {
                                String factName = line.substring( argStart + 1, line.lastIndexOf( ')' ) ).trim();
                                ActionGlobalCollectionAdd actionGlobalCollectionAdd = new ActionGlobalCollectionAdd();
                                actionGlobalCollectionAdd.setGlobalName( variable );
                                actionGlobalCollectionAdd.setFactName( factName );
                                m.addRhsItem( actionGlobalCollectionAdd );
                            } else {
                                m.addRhsItem( getActionCallMethod( m, isJavaDialect, boundParams, dmo, line, variable, methodName ) );
                            }
                            continue;
View Full Code Here

                                                           lineCounter );
                                setters.add( line );
                            } else if ( methodName.equals( "add" ) && expandedDRLInfo.hasGlobal( variable ) ) {
                                String factName = line.substring( argStart + 1,
                                                                  line.lastIndexOf( ')' ) ).trim();
                                ActionGlobalCollectionAdd actionGlobalCollectionAdd = new ActionGlobalCollectionAdd();
                                actionGlobalCollectionAdd.setGlobalName( variable );
                                actionGlobalCollectionAdd.setFactName( factName );
                                m.addRhsItem( actionGlobalCollectionAdd );
                            } else {
                                m.addRhsItem( getActionCallMethod( m,
                                                                   isJavaDialect,
                                                                   boundParams,
View Full Code Here

                                 "GLOBCOL" + glob + var );
                cmds.put( "GLOBCOL" + glob + var,
                          new Command() {

                              public void execute() {
                                  ActionGlobalCollectionAdd gca = new ActionGlobalCollectionAdd();
                                  gca.setGlobalName( glob );
                                  gca.setFactName( var );
                                  model.addRhsItem( gca,
                                                    Integer.parseInt( positionCbo.getValue( positionCbo.getSelectedIndex() ) ) );
                                  hide();
                              }
                          } );
View Full Code Here

                                setStatements.put( variable, setters );
                            }
                            setters.add( line );
                        } else if ( methodName.equals( "add" ) && expandedDRLInfo.hasGlobal( variable ) ) {
                            String factName = line.substring( argStart + 1, line.lastIndexOf( ')' ) ).trim();
                            ActionGlobalCollectionAdd actionGlobalCollectionAdd = new ActionGlobalCollectionAdd();
                            actionGlobalCollectionAdd.setGlobalName( variable );
                            actionGlobalCollectionAdd.setFactName( factName );
                            m.addRhsItem( actionGlobalCollectionAdd );
                        } else {
                            ActionCallMethod acm = new ActionCallMethod();
                            acm.setMethodName( methodName );
                            acm.setVariable( variable );
View Full Code Here

                                 "GLOBCOL" + glob + var );
                cmds.put( "GLOBCOL" + glob + var,
                          new Command() {

                              public void execute() {
                                  ActionGlobalCollectionAdd gca = new ActionGlobalCollectionAdd();
                                  gca.setGlobalName( glob );
                                  gca.setFactName( var );
                                  model.addRhsItem( gca,
                                                    Integer.parseInt( positionCbo.getValue( positionCbo.getSelectedIndex() ) ) );
                                  hide();
                              }
                          } );
View Full Code Here

            this.readOnly = !this.isFactTypeKnown;
        } else {
            this.readOnly = readOnly;
        }

        ActionGlobalCollectionAdd gca = (ActionGlobalCollectionAdd) action;
        SimplePanel sp = new SimplePanel();
        sp.setStyleName( "model-builderInner-Background" ); //NON-NLS
        sp.add( new SmallLabel( " " + Constants.INSTANCE.AddXToListY( gca.getFactName(),
                                                                           gca.getGlobalName() ) ) );

        if ( this.readOnly ) {
            this.layout.addStyleName( "editor-disabled-widget" );
            sp.addStyleName( "editor-disabled-widget" );
        }
View Full Code Here

        RuleModel m = RuleModelDRLPersistenceImpl.getInstance().unmarshal( drl,
                                                                           Collections.EMPTY_LIST,
                                                                           dmo );

        assertTrue( m.rhs[ 0 ] instanceof ActionGlobalCollectionAdd );
        ActionGlobalCollectionAdd actionGlobalCollectionAdd = (ActionGlobalCollectionAdd) m.rhs[ 0 ];
        assertEquals( "keke", actionGlobalCollectionAdd.getGlobalName() );
        assertEquals( "a", actionGlobalCollectionAdd.getFactName() );

    }
View Full Code Here

                                 "GLOBCOL" + glob + var );
                cmds.put( "GLOBCOL" + glob + var,
                          new Command() {

                              public void execute() {
                                  ActionGlobalCollectionAdd gca = new ActionGlobalCollectionAdd();
                                  gca.setGlobalName( glob );
                                  gca.setFactName( var );
                                  model.addRhsItem( gca,
                                                    Integer.parseInt( positionCbo.getValue( positionCbo.getSelectedIndex() ) ) );
                                  hide();
                              }
                          } );
View Full Code Here

TOP

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

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.