public void visitActionSetField( final ActionSetField action ) { getClasses( action.getFieldValues() ); }
public void visitActionSetField( final ActionSetField action ) { if ( action instanceof ActionCallMethod ) { this.generateSetMethodCallsMethod( (ActionCallMethod) action, action.getFieldValues() ); } else { this.generateSetMethodCalls( action.getVariable(), action.getFieldValues() ); } }
private void visitActionFieldList( ActionSetField afl ) { String factType = model.getLHSBindingType( afl.getVariable() ); for ( ActionFieldValue afv : afl.getFieldValues() ) { InterpolationVariable var = new InterpolationVariable( afv.getValue(), afv.getType(), factType, afv.getField() ); if ( afv.getNature() == FieldNatureType.TYPE_TEMPLATE && !vars.containsKey( var ) ) { vars.put( var, vars.size() ); } } }
private void doLayout() { layout.clear(); for ( int i = 0; i < model.getFieldValues().length; i++ ) { ActionFieldValue val = model.getFieldValues()[ i ]; if ( model.getFieldValues().length == 0 ) { HorizontalPanel h = new HorizontalPanel(); h.add( getSetterLabel() );
private ActionSetField visitActionFieldList( ActionSetField afl ) { ActionSetField clone = new ActionSetField(); clone.setVariable( afl.getVariable() ); for ( ActionFieldValue afv : afl.getFieldValues() ) { ActionFieldValue afvClone = new ActionFieldValue(); afvClone.setField( afv.getField() ); afvClone.setNature( afv.getNature() ); afvClone.setType( afv.getType() ); afvClone.setValue( afv.getValue() ); clone.addFieldValue( afvClone ); } return clone; }
a1.getVariable() ); assertEquals( 2, a1.getFieldValues().length ); a1.getFieldValues()[ 0 ].getField() ); assertEquals( "actionsetfield1", a1.getFieldValues()[ 0 ].getValue() ); assertEquals( DataType.TYPE_STRING, a1.getFieldValues()[ 0 ].getType() ); a1.getFieldValues()[ 1 ].getField() ); assertEquals( "actionsetfield2", a1.getFieldValues()[ 1 ].getValue() ); assertEquals( DataType.TYPE_NUMERIC_INTEGER, a1.getFieldValues()[ 1 ].getType() );
a1.getVariable() ); assertEquals( 2, a1.getFieldValues().length ); final ActionFieldValue fv1a1 = a1.getFieldValues()[ 0 ]; assertEquals( "name", fv1a1.getField() ); fv1a1.getValue() ); final ActionFieldValue fv1a2 = a1.getFieldValues()[ 1 ]; assertEquals( "age", fv1a2.getField() );
a.getVariable() ); assertEquals( 1, a.getFieldValues().length ); final ActionFieldValue fv = a.getFieldValues()[ 0 ]; assertEquals( "name", fv.getField() );
"$r" ); assertEquals( 1, asf.getFieldValues().length ); ActionFieldValue fv1 = asf.getFieldValues()[ 0 ]; assertNotNull( fv1 ); assertTrue( fv1 instanceof ActionWorkItemFieldValue );
private Widget valueEditor( final ActionFieldValue val ) { DataModelOracle completions = this.getModeller().getSuggestionCompletions(); String type = ""; if ( completions.isGlobalVariable( this.model.getVariable() ) ) { type = completions.getGlobalVariable( this.model.getVariable() ); } else { type = this.getModeller().getModel().getLHSBindingType( this.model.getVariable() ); /* * to take in account if the using a rhs bound variable */ if ( type == null && !this.readOnly ) { type = this.getModeller().getModel().getRHSBoundFact( this.model.getVariable() ).getFactType(); } } DropDownData enums = completions.getEnums( type, val.getField(), FieldNatureUtil.toMap( this.model.getFieldValues() ) ); ActionValueEditor actionValueEditor = new ActionValueEditor( val, enums, this.getModeller(), this.getEventBus(), val.getType(), this.readOnly ); actionValueEditor.setOnChangeCommand( new Command() { public void execute() { setModified( true ); } } ); return actionValueEditor; }
"$r" ); assertEquals( 4, asf.getFieldValues().length ); ActionFieldValue fv1 = asf.getFieldValues()[ 0 ]; assertNotNull( fv1 ); assertTrue( fv1 instanceof ActionWorkItemFieldValue ); wifv1.getWorkItemParameterClassName() ); ActionFieldValue fv2 = asf.getFieldValues()[ 1 ]; assertNotNull( fv2 ); assertTrue( fv2 instanceof ActionWorkItemFieldValue ); wifv2.getWorkItemParameterClassName() ); ActionFieldValue fv3 = asf.getFieldValues()[ 2 ]; assertNotNull( fv3 ); assertTrue( fv3 instanceof ActionWorkItemFieldValue ); wifv3.getWorkItemParameterClassName() ); ActionFieldValue fv4 = asf.getFieldValues()[ 3 ]; assertNotNull( fv4 ); assertTrue( fv4 instanceof ActionWorkItemFieldValue );