/** @generated */
 protected void handleNotificationEvent(Notification event) {
   Object feature = event.getFeature();
   if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
     Integer c = (Integer) event.getNewValue();
     setFontColor(DiagramColorRegistry.getInstance().getColor(c));
   } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
     refreshUnderline();
   } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
     refreshStrikeThrough();
   } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature)
       || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature)
       || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
       || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
     refreshFont();
   } else {
     if (getParser() != null
         && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
       refreshLabel();
     }
     if (getParser() instanceof ISemanticParser) {
       ISemanticParser modelParser = (ISemanticParser) getParser();
       if (modelParser.areSemanticElementsAffected(null, event)) {
         removeSemanticListeners();
         if (resolveSemanticElement() != null) {
           addSemanticListeners();
         }
         refreshLabel();
       }
     }
   }
   super.handleNotificationEvent(event);
 }
Exemplo n.º 2
0
  /**
   * @generated NOT (update at each lifeline name modification) handle possible change in the name
   *     container size
   */
  protected void handleNotificationEvent(Notification event) {
    refreshLabel();
    Object feature = event.getFeature();
    if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
      Integer c = (Integer) event.getNewValue();
      setFontColor(DiagramColorRegistry.getInstance().getColor(c));
    } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
      refreshUnderline();
    } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
      refreshStrikeThrough();
    } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature)
        || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature)
        || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
        || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
      refreshFont();
    } else {
      if (getParser() != null
          && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
        refreshLabel();
      }
      if (getParser() instanceof ISemanticParser) {
        ISemanticParser modelParser = (ISemanticParser) getParser();
        if (modelParser.areSemanticElementsAffected(null, event)) {
          removeSemanticListeners();
          if (resolveSemanticElement() != null) {
            addSemanticListeners();
          }
          refreshLabel();
        }
      }
    }

    // handle possible change in the name container size
    if (UMLPackage.Literals.LIFELINE__REPRESENTS.equals(feature)
        || UMLPackage.Literals.LIFELINE__DECOMPOSED_AS.equals(feature)
        || UMLPackage.Literals.LIFELINE__SELECTOR.equals(feature)
        || event.getNotifier() instanceof Bounds) {
      ((LifelineEditPart) getParent()).updateLifelinePosition();
    }

    super.handleNotificationEvent(event);
  }