Esempio n. 1
0
  /**
   * We override this method in order to be able to return the call-event's operation name when the
   * event's name itself has not been specified.
   *
   * @return name
   */
  @Override
  public String getName() {
    String name = super.getName();

    if (StringUtils.isBlank(name)) {
      final ModelElementFacade operation = getOperation();
      if (operation != null) {
        name = operation.getName();
      }
    }

    return name;
  }
 /** @see org.andromda.metafacades.uml.FrontEndView#getVariables() */
 @Override
 protected List<ModelElementFacade> handleGetVariables() {
   final Map<String, ModelElementFacade> variablesMap =
       new LinkedHashMap<String, ModelElementFacade>();
   final Collection<TransitionFacade> incoming = getIncomings();
   for (final Iterator iterator = incoming.iterator(); iterator.hasNext(); ) {
     final TransitionFacade transition = (TransitionFacade) iterator.next();
     final EventFacade trigger = transition.getTrigger();
     if (trigger != null) {
       for (final Iterator parameterIterator = trigger.getParameters().iterator();
           parameterIterator.hasNext(); ) {
         final ModelElementFacade modelElement = (ModelElementFacade) parameterIterator.next();
         variablesMap.put(modelElement.getName(), modelElement);
       }
     }
   }
   return new ArrayList<ModelElementFacade>(variablesMap.values());
 }