Beispiel #1
0
  @SuppressWarnings("unused")
  private String[] getAcceptedNodeNames(ArroAction cond) {
    String[] ret;

    ArroTransition n = getTransition();
    ArrayList<String> list = n.getParent().getParent().getNodeNames();
    // Add empty option in order to remove the entry
    list.add(0, "");

    ret = list.toArray(new String[list.size()]);

    return ret;
  }
Beispiel #2
0
  /**
   * Refresh the contents of the control - sync properties with domain info. Since this may trigger
   * the listener(s) attached, we prevent that using listenerFlag.
   */
  @Override
  public void refresh() {
    PictogramElement pe = getSelectedPictogramElement();
    if (pe != null) {
      ArroTransition n = getTransition();

      if (n != null) {
        // Make sure to first read these variables from domain
        name = n.getCondition() == null ? "" : n.getCondition();

        // Temp disable listener; listener only needed if user does types new value.
        listenerFlag = false;

        if (!(name.equals(nameTextVal))) {
          nameTextVal.setText(name);
        }

        listenerFlag = true;
      }
    }
  }