Examples of Bpmn2Preferences


Examples of org.eclipse.bpmn2.modeler.core.Bpmn2Preferences

    ItemProviderAdapter itemProviderAdapter = (ItemProviderAdapter) new Bpmn2ItemProviderAdapterFactory().adapt(be,
        ItemProviderAdapter.class);

    EList<EAttribute> eAllAttributes = be.eClass().getEAllAttributes();
    Bpmn2Preferences preferences = Bpmn2Preferences.getPreferences(project);

    for (EAttribute a : eAllAttributes) {

      if (preferences.isEnabled(be.eClass(), a)) {
        IItemPropertyDescriptor propertyDescriptor = itemProviderAdapter.getPropertyDescriptor(be, a);

        if (String.class.equals(a.getEType().getInstanceClass())) {
          bind(a, createTextInput(propertyDescriptor.getDisplayName(be), propertyDescriptor.isMultiLine(be)));
        } else if (boolean.class.equals(a.getEType().getInstanceClass())) {
          bindBoolean(a, createBooleanInput(propertyDescriptor.getDisplayName(be)));
        } else if (int.class.equals(a.getEType().getInstanceClass())) {
          bindInt(a, createIntInput(propertyDescriptor.getDisplayName(be)));
        } else if (propertyDescriptor != null) {
          propertyDescriptor.getChoiceOfValues(be);
          createLabel(propertyDescriptor.getDisplayName(be));
          createSingleItemEditor(a, be.eGet(a), propertyDescriptor.getChoiceOfValues(be));
        }
      }
    }

    EList<EReference> eAllContainments = be.eClass().getEAllContainments();
    for (EReference e : be.eClass().getEAllReferences()) {
      if (preferences.isEnabled(be.eClass(), e) && !eAllContainments.contains(e)) {
        IItemPropertyDescriptor propertyDescriptor = itemProviderAdapter.getPropertyDescriptor(be, e);
        bindReference(e, propertyDescriptor.getDisplayName(e));
      }
    }
View Full Code Here

Examples of org.eclipse.bpmn2.modeler.core.Bpmn2Preferences

          break;
        }
      }
    }

    Bpmn2Preferences pref = Bpmn2Preferences.getPreferences(project);

    List<IPaletteCompartmentEntry> ret = new ArrayList<IPaletteCompartmentEntry>();

    // add compartments from super class
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.