Ejemplo n.º 1
0
  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();
  }
Ejemplo n.º 2
0
 public boolean evaluate(Object candidate) {
   Component_c selected = (Component_c) candidate;
   return selected.getName().equals("SingleDimensionFixedArrays");
 }