private void populateTransformerInstances(ModelClass_c testObj, boolean instanceBased) {
   for (int i = 0; i < funcs.length; ++i) {
     Operation_c[] testObjTrans = Operation_c.getManyO_TFRsOnR115(testObj);
     Operation_c testTrans = null;
     for (int tfrInstCount = 0; tfrInstCount < testObjTrans.length; tfrInstCount++) {
       Operation_c selected = testObjTrans[tfrInstCount];
       if (selected.getName().equals(funcs[i])) {
         testTrans = testObjTrans[tfrInstCount];
         break;
       }
     }
     if (testTrans != null) {
       if (instanceBased) {
         if (m_testIBTfr[i] == null) m_testIBTfr[i] = testTrans;
       } else {
         if (m_testCBTfr[i] == null) m_testCBTfr[i] = testTrans;
       }
     } else
       fail(
           "Missing operation "
               + testObj.getKey_lett()
               + "::"
               + funcs[i]); // $NON-NLS-1$//$NON-NLS-2$
   }
 }
  private void populateArrayStateActionInstances() {
    class Object_test1_c implements ClassQueryInterface_c {
      Object_test1_c(String p) {
        m_p = p;
      }

      private String m_p;

      public boolean evaluate(Object inst) {
        ModelClass_c selected = (ModelClass_c) inst;
        return selected.getName().equals(m_p);
      }
    }
    ModelClass_c obj =
        ModelClass_c.ModelClassInstance(modelRoot, new Object_test1_c("ArrayOne")); // $NON-NLS-1$
    InstanceStateMachine_c ism = InstanceStateMachine_c.getOneSM_ISMOnR518(obj);
    StateMachine_c sm_i = StateMachine_c.getOneSM_SMOnR517(ism);
    StateMachineState_c[] states = StateMachineState_c.getManySM_STATEsOnR501(sm_i);
    Action_c i_acts[] =
        Action_c.getManySM_ACTsOnR514(
            ActionHome_c.getManySM_AHsOnR513(MooreActionHome_c.getManySM_MOAHsOnR511(states)));
    for (int i = 0; i < i_acts.length; ++i) {
      ActionHome_c ah = ActionHome_c.getOneSM_AHOnR514(i_acts[i]);
      MooreActionHome_c moah = MooreActionHome_c.getOneSM_MOAHOnR513(ah);
      StateMachineState_c st = StateMachineState_c.getOneSM_STATEOnR511(moah);
      if (st.getName().equals("StateOne")) // $NON-NLS-1$
      m_arrayStateAction[State_StateOne] = i_acts[i];
      else if (st.getName().equals("StateTwo")) // $NON-NLS-1$
      m_arrayStateAction[State_StateTwo] = i_acts[i];
      else if (st.getName().equals("StateThree")) // $NON-NLS-1$
      m_arrayStateAction[State_StateThree] = i_acts[i];
    }
  }
  protected void setUp() throws Exception {
    super.setUp();
    String componentPackageName = "Arrays";
    PersistableModelComponent domainComponentPackage =
        ensureAvailableAndLoaded(
            projectName, componentPackageName, false, false, "Component Package");
    arrayModelRoot = (Ooaofooa) domainComponentPackage.getRootModelElement().getModelRoot();

    IPreferenceStore store = CorePlugin.getDefault().getPreferenceStore();
    store.setValue(BridgePointPreferencesStore.ALLOW_IMPLICIT_COMPONENT_ADDRESSING, true);

    class ComponentNameTest implements ClassQueryInterface_c {
      public boolean evaluate(Object candidate) {
        Component_c selected = (Component_c) candidate;
        return selected.getName().equals("SingleDimensionFixedArrays");
      }
    }
    Component_c comp = Component_c.ComponentInstance(arrayModelRoot, new ComponentNameTest());

    populateFunctionInstances();
    populateBridgeInstances();
    class Object_test1_c implements ClassQueryInterface_c {
      Object_test1_c(String id) {
        m_id = id;
      }

      private String m_id;

      public boolean evaluate(Object inst) {
        ModelClass_c selected = (ModelClass_c) inst;
        return selected.getKey_lett().equals(m_id);
      }
    }
    ModelClass_c testObj =
        ModelClass_c.ModelClassInstance(arrayModelRoot, new Object_test1_c("A_T")); // $NON-NLS-1$

    populateTransformerInstances(testObj, false);

    populateInterfaceOperationInstances(comp, "Port1", true);
    populateInterfaceOperationInstances(comp, "Port2", false);
    populateArrayStateActionInstances();
  }
 public boolean evaluate(Object inst) {
   ModelClass_c selected = (ModelClass_c) inst;
   return selected.getName().equals(m_p);
 }
 public boolean evaluate(Object inst) {
   ModelClass_c selected = (ModelClass_c) inst;
   return selected.getKey_lett().equals(m_id);
 }