/**
  * {@inheritDoc}
  *
  * @see
  *     org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updatePart(org.eclipse.emf.common.notify.Notification)
  */
 public void updatePart(Notification msg) {
   super.updatePart(msg);
   if (editingPart.isVisible()) {
     DomainClassPropertiesEditionPart domainClassPart =
         (DomainClassPropertiesEditionPart) editingPart;
     if (EnvironmentPackage.eINSTANCE.getType_Name().equals(msg.getFeature())
         && msg.getNotifier().equals(semanticObject)
         && domainClassPart != null
         && isAccessible(GraalViewsRepository.DomainClass.Properties.name)) {
       if (msg.getNewValue() != null) {
         domainClassPart.setName(
             EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
       } else {
         domainClassPart.setName("");
       }
     }
     if (EnvironmentPackage.eINSTANCE.getStructuredType_Supertype().equals(msg.getFeature())
         && domainClassPart != null
         && isAccessible(GraalViewsRepository.DomainClass.Properties.superType))
       domainClassPart.setSuperType((EObject) msg.getNewValue());
     if (EnvironmentPackage.eINSTANCE.getObeoDSMObject_Description().equals(msg.getFeature())
         && msg.getNotifier().equals(semanticObject)
         && domainClassPart != null
         && isAccessible(GraalViewsRepository.DomainClass.Properties.description)) {
       if (msg.getNewValue() != null) {
         domainClassPart.setDescription(
             EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
       } else {
         domainClassPart.setDescription("");
       }
     }
   }
 }
 /**
  * {@inheritDoc}
  *
  * @see
  *     org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updatePart(org.eclipse.emf.common.notify.Notification)
  */
 public void updatePart(Notification msg) {
   super.updatePart(msg);
   if (editingPart.isVisible()) {
     FlowEventPropertiesEditionPart flowEventPart = (FlowEventPropertiesEditionPart) editingPart;
     if (EnvironmentPackage.eINSTANCE.getObeoDSMObject_Description().equals(msg.getFeature())
         && msg.getNotifier().equals(semanticObject)
         && flowEventPart != null
         && isAccessible(FlowViewsRepository.FlowEvent.Properties.description)) {
       if (msg.getNewValue() != null) {
         flowEventPart.setDescription(
             EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
       } else {
         flowEventPart.setDescription("");
       }
     }
     if (CinematicPackage.eINSTANCE.getNamedElement_Name().equals(msg.getFeature())
         && msg.getNotifier().equals(semanticObject)
         && flowEventPart != null
         && isAccessible(FlowViewsRepository.FlowEvent.Properties.name)) {
       if (msg.getNewValue() != null) {
         flowEventPart.setName(
             EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
       } else {
         flowEventPart.setName("");
       }
     }
     if (FlowPackage.eINSTANCE.getFlowEvent_Binds().equals(msg.getFeature())
         && isAccessible(FlowViewsRepository.FlowEvent.Properties.binds))
       flowEventPart.updateBinds();
   }
 }
 public static boolean affects(Notification notification, EClass clz) {
   if (notification.isTouch()) {
     return false;
   }
   switch (notification.getEventType()) {
     case Notification.ADD:
     case Notification.SET:
       return clz.isInstance(notification.getNewValue());
     case Notification.REMOVE:
     case Notification.UNSET:
       return clz.isInstance(notification.getOldValue());
     case Notification.ADD_MANY:
       return affects(notification.getNewValue(), clz);
     case Notification.REMOVE_MANY:
       return affects(notification.getOldValue(), clz);
     case Notification.MOVE:
       if (notification.getNotifier() instanceof EObject
           && notification.getFeature() instanceof EStructuralFeature) {
         return affects(
             ((EObject) notification.getNotifier())
                 .eGet((EStructuralFeature) notification.getFeature()),
             clz);
       }
       return false;
   }
   return false;
 }
 public static Collection<EObject> getAffectedValues(Notification notification, EClass clz) {
   if (notification.isTouch()) {
     return Collections.emptyList();
   }
   switch (notification.getEventType()) {
     case Notification.ADD:
     case Notification.SET:
       if (clz.isInstance(notification.getNewValue())) {
         return Collections.singletonList((EObject) notification.getNewValue());
       }
       return Collections.emptyList();
     case Notification.REMOVE:
     case Notification.UNSET:
       if (clz.isInstance(notification.getOldValue())) {
         return Collections.singletonList((EObject) notification.getOldValue());
       }
     case Notification.ADD_MANY:
       return affectingObjects(notification.getNewValue(), clz);
     case Notification.REMOVE_MANY:
       return affectingObjects(notification.getOldValue(), clz);
     case Notification.MOVE:
       if (notification.getNotifier() instanceof EObject
           && notification.getFeature() instanceof EStructuralFeature) {
         return affectingObjects(
             ((EObject) notification.getNotifier())
                 .eGet((EStructuralFeature) notification.getFeature()),
             clz);
       }
       return Collections.emptyList();
   }
   return Collections.emptyList();
 }
 /** @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();
       }
     }
   }
   if (event.getFeature().equals(UMLPackage.eINSTANCE.getFeature_IsStatic())) {
     refreshUnderline();
   }
   super.handleNotificationEvent(event);
 }
 /**
  * {@inheritDoc}
  *
  * @see
  *     org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updatePart(org.eclipse.emf.common.notify.Notification)
  */
 public void updatePart(Notification msg) {
   if (editingPart.isVisible()) {
     PropertiesEditionElementPropertiesEditionPart basePart =
         (PropertiesEditionElementPropertiesEditionPart) editingPart;
     if (MappingPackage.eINSTANCE.getAbstractPropertyBinding_Name().equals(msg.getFeature())
         && basePart != null
         && isAccessible(ComponentsViewsRepository.PropertiesEditionElement.Properties.name)) {
       if (msg.getNewValue() != null) {
         basePart.setName(
             EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
       } else {
         basePart.setName("");
       }
     }
     if (MappingPackage.eINSTANCE.getAbstractPropertyBinding_Views().equals(msg.getFeature())
         && isAccessible(ComponentsViewsRepository.PropertiesEditionElement.Binding.views))
       basePart.updateViews();
     if (MappingPackage.eINSTANCE.getEMFPropertyBinding_Model().equals(msg.getFeature())
         && basePart != null
         && isAccessible(ComponentsViewsRepository.PropertiesEditionElement.Binding.model))
       basePart.setModel((EObject) msg.getNewValue());
     if (ComponentsPackage.eINSTANCE.getEEFElement_HelpID().equals(msg.getFeature())
         && basePart != null
         && isAccessible(ComponentsViewsRepository.PropertiesEditionElement.Properties.helpID)) {
       if (msg.getNewValue() != null) {
         basePart.setHelpID(
             EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
       } else {
         basePart.setHelpID("");
       }
     }
   }
 }
  /**
   * {@inheritDoc}
   *
   * @see
   *     org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updatePart(org.eclipse.emf.common.notify.Notification)
   */
  public void updatePart(Notification msg) {
    if (editingPart.isVisible()) {
      LinkEndDestructionDataPropertiesEditionPart basePart =
          (LinkEndDestructionDataPropertiesEditionPart) editingPart;
      if (UMLPackage.eINSTANCE.getLinkEndData_Value().equals(msg.getFeature())
          && basePart != null
          && isAccessible(UmlViewsRepository.LinkEndDestructionData.Properties.value))
        basePart.setValue((EObject) msg.getNewValue());
      if (UMLPackage.eINSTANCE.getLinkEndData_End().equals(msg.getFeature())
          && basePart != null
          && isAccessible(UmlViewsRepository.LinkEndDestructionData.Properties.end))
        basePart.setEnd((EObject) msg.getNewValue());
      if (UMLPackage.eINSTANCE
              .getLinkEndDestructionData_IsDestroyDuplicates()
              .equals(msg.getFeature())
          && basePart != null
          && isAccessible(UmlViewsRepository.LinkEndDestructionData.Properties.isDestroyDuplicates))
        basePart.setIsDestroyDuplicates((Boolean) msg.getNewValue());

      if (UMLPackage.eINSTANCE.getLinkEndDestructionData_DestroyAt().equals(msg.getFeature())
          && basePart != null
          && isAccessible(UmlViewsRepository.LinkEndDestructionData.Properties.destroyAt))
        basePart.setDestroyAt((EObject) msg.getNewValue());
    }
  }
	/**
	 * {@inheritDoc}
	 * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updatePart(org.eclipse.emf.common.notify.Notification)
	 */
	public void updatePart(Notification msg) {
		super.updatePart(msg);
		if (editingPart.isVisible()) {
			ArtifactIdentifierPropertiesEditionPart basePart = (ArtifactIdentifierPropertiesEditionPart)editingPart;
			if (ScoPackage.eINSTANCE.getArtifactIdentifier_ResourceName().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && basePart != null && isAccessible(ScoViewsRepository.ArtifactIdentifier.Properties.resourceName)) {
				if (msg.getNewValue() != null) {
					basePart.setResourceName(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
				} else {
					basePart.setResourceName("");
				}
			}
			if (ScoPackage.eINSTANCE.getArtifactIdentifier_BaselinedLineCount().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && basePart != null && isAccessible(ScoViewsRepository.ArtifactIdentifier.Properties.baselinedLineCount)) {
				if (msg.getNewValue() != null) {
					basePart.setBaselinedLineCount(EcoreUtil.convertToString(EcorePackage.Literals.EINT, msg.getNewValue()));
				} else {
					basePart.setBaselinedLineCount("");
				}
			}
			if (ScoPackage.eINSTANCE.getArtifactIdentifier_CurrentLineCount().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && basePart != null && isAccessible(ScoViewsRepository.ArtifactIdentifier.Properties.currentLineCount)) {
				if (msg.getNewValue() != null) {
					basePart.setCurrentLineCount(EcoreUtil.convertToString(EcorePackage.Literals.EINT, msg.getNewValue()));
				} else {
					basePart.setCurrentLineCount("");
				}
			}
			
		}
	}
 /**
  * {@inheritDoc}
  *
  * @see
  *     org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updatePart(org.eclipse.emf.common.notify.Notification)
  */
 public void updatePart(Notification msg) {
   super.updatePart(msg);
   if (editingPart.isVisible()) {
     NamespacePropertiesEditionPart namespacePart = (NamespacePropertiesEditionPart) editingPart;
     if (EnvironmentPackage.eINSTANCE.getNamespace_Name().equals(msg.getFeature())
         && msg.getNotifier().equals(semanticObject)
         && namespacePart != null
         && isAccessible(EnvironmentViewsRepository.Namespace.Properties.name)) {
       if (msg.getNewValue() != null) {
         namespacePart.setName(
             EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
       } else {
         namespacePart.setName("");
       }
     }
     if (EnvironmentPackage.eINSTANCE.getObeoDSMObject_Description().equals(msg.getFeature())
         && msg.getNotifier().equals(semanticObject)
         && namespacePart != null
         && isAccessible(EnvironmentViewsRepository.Namespace.Properties.description)) {
       if (msg.getNewValue() != null) {
         namespacePart.setDescription(
             EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
       } else {
         namespacePart.setDescription("");
       }
     }
   }
 }
 /**
  * {@inheritDoc}
  *
  * @see
  *     org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updatePart(org.eclipse.emf.common.notify.Notification)
  */
 public void updatePart(Notification msg) {
   if (editingPart.isVisible()) {
     RotateAnimationPropertiesEditionPart basePart =
         (RotateAnimationPropertiesEditionPart) editingPart;
     if (DroidPackage.eINSTANCE.getTerminalAnimationElements_FromAlpha().equals(msg.getFeature())
         && basePart != null
         && isAccessible(DroidViewsRepository.RotateAnimation.Properties.fromAlpha)) {
       if (msg.getNewValue() != null) {
         basePart.setFromAlpha(
             EcoreUtil.convertToString(
                 EcorePackage.eINSTANCE.getEFloatObject(), msg.getNewValue()));
       } else {
         basePart.setFromAlpha("");
       }
     }
     if (DroidPackage.eINSTANCE.getTerminalAnimationElements_ToAlpha().equals(msg.getFeature())
         && basePart != null
         && isAccessible(DroidViewsRepository.RotateAnimation.Properties.toAlpha)) {
       if (msg.getNewValue() != null) {
         basePart.setToAlpha(
             EcoreUtil.convertToString(
                 EcorePackage.eINSTANCE.getEFloatObject(), msg.getNewValue()));
       } else {
         basePart.setToAlpha("");
       }
     }
   }
 }
 /**
  * {@inheritDoc}
  *
  * @see
  *     org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updatePart(org.eclipse.emf.common.notify.Notification)
  */
 public void updatePart(Notification msg) {
   super.updatePart(msg);
   if (editingPart.isVisible()) {
     CommandPropertiesEditionPart basePart = (CommandPropertiesEditionPart) editingPart;
     if (StatemachinePackage.eINSTANCE.getCommand_Name().equals(msg.getFeature())
         && msg.getNotifier().equals(semanticObject)
         && basePart != null
         && isAccessible(StatemachineViewsRepository.Command.Properties.name)) {
       if (msg.getNewValue() != null) {
         basePart.setName(
             EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
       } else {
         basePart.setName("");
       }
     }
     if (StatemachinePackage.eINSTANCE.getCommand_Code().equals(msg.getFeature())
         && msg.getNotifier().equals(semanticObject)
         && basePart != null
         && isAccessible(StatemachineViewsRepository.Command.Properties.code)) {
       if (msg.getNewValue() != null) {
         basePart.setCode(
             EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
       } else {
         basePart.setCode("");
       }
     }
   }
 }
 private boolean isDTableElementStyleAttributeChange(Notification notification) {
   boolean isStyleFeature =
       notification.getFeature() == TablePackage.Literals.DTABLE_ELEMENT_STYLE__BACKGROUND_COLOR
           || notification.getFeature()
               == TablePackage.Literals.DTABLE_ELEMENT_STYLE__FOREGROUND_COLOR
           || notification.getFeature() == TablePackage.Literals.DTABLE_ELEMENT_STYLE__LABEL_FORMAT
           || notification.getFeature() == TablePackage.Literals.DTABLE_ELEMENT_STYLE__LABEL_SIZE;
   return isStyleFeature && notification.getNotifier() instanceof DTableElementStyle;
 }
 @Override
 public void notifyChanged(Notification msg) {
   if (msg.getFeature().equals(ScaPackage.eINSTANCE.getComposite_Name())) {
     refresh();
   } else if (msg.getFeature().equals(ScaPackage.eINSTANCE.getComponent_Name())) {
     refresh();
   } else {
     refresh();
   }
   super.notifyChanged(msg);
 }
 /**
  * {@inheritDoc}
  *
  * @see
  *     org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updatePart(org.eclipse.emf.common.notify.Notification)
  */
 public void updatePart(Notification msg) {
   super.updatePart(msg);
   if (editingPart.isVisible()) {
     NotesPropertiesEditionPart notesPart = (NotesPropertiesEditionPart) editingPart;
     if (SACMPackage.eINSTANCE.getModelElement_TaggedValue().equals(msg.getFeature())
         && isAccessible(EvidenceViewsRepository.Notes.Properties.taggedValue))
       notesPart.updateTaggedValue();
     if (SACMPackage.eINSTANCE.getModelElement_Annotation().equals(msg.getFeature())
         && isAccessible(EvidenceViewsRepository.Notes.Properties.annotation))
       notesPart.updateAnnotation();
   }
 }
  /**
   * Papyrus codeGen
   *
   * @generated
   */
  protected void handleNotificationEvent(Notification event) {
    super.handleNotificationEvent(event);

    // set the figure active when the feature of the of a class is true
    if (resolveSemanticElement() != null) {
      if (resolveSemanticElement().equals(event.getNotifier())
          && (event.getFeature() instanceof EAttribute)
          && ((EAttribute) (event.getFeature())).getName().equals("isActive")) {
        ((ClassifierFigure) getFigure()).setActive(event.getNewBooleanValue());
        refreshVisuals();
      }
    }
  }
  /**
   * {@inheritDoc}
   *
   * @see
   *     org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updatePart(org.eclipse.emf.common.notify.Notification)
   */
  public void updatePart(Notification msg) {
    super.updatePart(msg);
    if (editingPart.isVisible()) {
      ReferencePropertiesEditionPart referencePart = (ReferencePropertiesEditionPart) editingPart;
      if (EnvironmentPackage.eINSTANCE.getProperty_Name().equals(msg.getFeature())
          && msg.getNotifier().equals(semanticObject)
          && referencePart != null
          && isAccessible(EnvironmentViewsRepository.Reference.Properties.name)) {
        if (msg.getNewValue() != null) {
          referencePart.setName(
              EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
        } else {
          referencePart.setName("");
        }
      }
      if (EnvironmentPackage.eINSTANCE.getReference_ReferencedType().equals(msg.getFeature())
          && referencePart != null
          && isAccessible(EnvironmentViewsRepository.Reference.Properties.referencedType))
        referencePart.setReferencedType((EObject) msg.getNewValue());
      if (EnvironmentPackage.eINSTANCE.getProperty_Multiplicity().equals(msg.getFeature())
          && msg.getNotifier().equals(semanticObject)
          && isAccessible(EnvironmentViewsRepository.Reference.Properties.multiplicity))
        referencePart.setMultiplicity((MultiplicityKind) msg.getNewValue());

      if (EnvironmentPackage.eINSTANCE.getReference_IsComposite().equals(msg.getFeature())
          && msg.getNotifier().equals(semanticObject)
          && referencePart != null
          && isAccessible(EnvironmentViewsRepository.Reference.Properties.isComposite))
        referencePart.setIsComposite((Boolean) msg.getNewValue());

      if (EnvironmentPackage.eINSTANCE.getReference_Navigable().equals(msg.getFeature())
          && msg.getNotifier().equals(semanticObject)
          && referencePart != null
          && isAccessible(EnvironmentViewsRepository.Reference.Properties.navigable))
        referencePart.setNavigable((Boolean) msg.getNewValue());

      if (EnvironmentPackage.eINSTANCE.getReference_OppositeOf().equals(msg.getFeature())
          && referencePart != null
          && isAccessible(EnvironmentViewsRepository.Reference.Properties.oppositeOf))
        referencePart.setOppositeOf((EObject) msg.getNewValue());
      if (EnvironmentPackage.eINSTANCE.getProperty_IsIdentifier().equals(msg.getFeature())
          && msg.getNotifier().equals(semanticObject)
          && referencePart != null
          && isAccessible(EnvironmentViewsRepository.Reference.Properties.identifier))
        referencePart.setIdentifier((Boolean) msg.getNewValue());

      if (EnvironmentPackage.eINSTANCE.getObeoDSMObject_Description().equals(msg.getFeature())
          && msg.getNotifier().equals(semanticObject)
          && referencePart != null
          && isAccessible(EnvironmentViewsRepository.Reference.Properties.description)) {
        if (msg.getNewValue() != null) {
          referencePart.setDescription(
              EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
        } else {
          referencePart.setDescription("");
        }
      }
    }
  }
 @Override
 public void notifyChanged(Notification notification) {
   super.notifyChanged(notification);
   if (this.object == notification.getNotifier() && this.feature == notification.getFeature()) {
     button.setSelection((Boolean) object.eGet(feature));
   }
 }
  /** @generated */
  @Override
  protected void handleNotificationEvent(Notification notification) {
    super.handleNotificationEvent(notification);

    if (notification.getNotifier() instanceof de.uni_mannheim.informatik.swt.models.plm.PLM.Feature
        && ((EStructuralFeature) notification.getFeature()).getName().equals("expressed")) {
      IGraphicalEditPart parent = (IGraphicalEditPart) getParent();
      de.uni_mannheim.informatik.swt.models.plm.PLM.Element self =
          (de.uni_mannheim.informatik.swt.models.plm.PLM.Element) resolveSemanticElement();

      // Check is visible
      if (parent.resolveSemanticElement()
          instanceof de.uni_mannheim.informatik.swt.models.plm.PLM.Context) {
        de.uni_mannheim.informatik.swt.models.plm.PLM.Context container =
            (de.uni_mannheim.informatik.swt.models.plm.PLM.Context) parent.resolveSemanticElement();
        if ((container.getOrigin().equalsIgnoreCase("computed") && self.isExpressed())
            || (container.getOrigin().equalsIgnoreCase("expressed") && !self.isExpressed())) {
          getNotationView().setVisible(false);
        }
      } else {
        getNotationView().setVisible(true);
      }

      de.uni_mannheim.informatik.swt.models.plm.PLM.Feature f =
          (de.uni_mannheim.informatik.swt.models.plm.PLM.Feature) resolveSemanticElement();
      if (f.isExpressed()) {
        ((org.eclipse.gmf.runtime.notation.Shape) this.getNotationView()).setItalic(false);
        ((org.eclipse.gmf.runtime.notation.Shape) this.getNotationView()).setFontColor(0);
      } else {
        ((org.eclipse.gmf.runtime.notation.Shape) this.getNotationView()).setItalic(true);
        ((org.eclipse.gmf.runtime.notation.Shape) this.getNotationView())
            .setFontColor(FigureUtilities.colorToInteger(DiagramColorConstants.diagramGray));
      }
    }
  }
  /**
   * @see
   *     org.eclipse.gmf.runtime.diagram.core.listener.NotificationListener#notifyChanged(org.eclipse.emf.common.notify.Notification)
   * @param notification
   */
  public void notifyChanged(Notification notification) {
    Object feature = notification.getFeature();
    boolean headChanged = false;
    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)) {
      headChanged = true;
    } else if (notification.getNotifier() instanceof EAnnotation
        && UMLVisualInformationPapyrusConstant.STEREOTYPE_ANNOTATION
            == ((EAnnotation) notification.getNotifier()).getSource()) {
      headChanged = true;
    } else if ((notification.getNotifier() instanceof DynamicEObjectImpl)
        && (hostSemanticElement != null)
        && (hostSemanticElement.getStereotypeApplications().contains(notification.getNotifier()))) {
      headChanged = true;
    } else if (PapyrusStereotypeListener.MODIFIED_STEREOTYPE == notification.getEventType()) {
      headChanged = true;
    } else if (notification instanceof StereotypeCustomNotification) {
      headChanged = true;
    }
    if (headChanged) {
      Display.getDefault()
          .asyncExec(
              new Runnable() {

                public void run() {
                  impactLayout();
                }
              });
    }
  }
 @Override
 protected boolean affectsViolations(Notification notification) {
   Object feature = notification.getFeature();
   if ((feature == PlanPackage.Literals.EPLAN_PARENT__CHILDREN)
       || (feature == PlanPackage.Literals.EACTIVITY__CHILDREN)) {
     return true;
   }
   if ((feature == TemporalPackage.Literals.TEMPORAL_MEMBER__START_TIME)
       || (feature == TemporalPackage.Literals.TEMPORAL_MEMBER__DURATION)
       || (feature == TemporalPackage.Literals.TEMPORAL_MEMBER__END_TIME)
       || (feature == TemporalPackage.Literals.TEMPORAL_MEMBER__SCHEDULED)) {
     return true;
   }
   if ((feature == ConstraintsPackage.Literals.CONSTRAINTS_MEMBER__PERIODIC_TEMPORAL_CONSTRAINTS)
       || (feature == ConstraintsPackage.Literals.CONSTRAINTS_MEMBER__BINARY_TEMPORAL_CONSTRAINTS)
       || (feature == ConstraintsPackage.Literals.CONSTRAINTS_MEMBER__CHAIN)) {
     return true;
   }
   if (feature == AdvisorPackage.Literals.IWAIVABLE__WAIVER_RATIONALE) {
     return true;
   }
   if (ADParameterUtils.isActivityAttributeOrParameter(notification.getNotifier())) {
     return true;
   }
   return false;
 }
  @Override
  protected void handleNotificationEvent(Notification notification) {
    super.handleNotificationEvent(notification);
    if ((notification.getEventType() == Notification.SET)
        && (notification.getNotifier() instanceof org.ow2.aspirerfid.ide.bpwme.impl.EBProcImpl)) {

      EBProcImpl epi = (EBProcImpl) notification.getNotifier();
      EAttributeImpl ei = (EAttributeImpl) notification.getFeature();
      MainControl mc = MainControl.getMainControl();

      org.ow2.aspirerfid.commons.apdl.model.EBProc ebproc =
          (org.ow2.aspirerfid.commons.apdl.model.EBProc) mc.getMapObject(epi.hashCode());

      EPCISMasterDataDocumentType doc = MasterDataUtil.getEPCISMasterDataDocument(ebproc);
      VocabularyElementType vocabularyElement = MasterDataUtil.getEBProcVocabularyElement(doc);

      if (ei.getName().equals("id")) {
        ebproc.setId(notification.getNewStringValue());
        MasterDataUtil.setVocabularyElementID(vocabularyElement, notification.getNewStringValue());
      } else if (ei.getName().equals("name")) {
        ebproc.setName(notification.getNewStringValue());
        MasterDataUtil.setVocabularyElementAttribute(
            vocabularyElement,
            "urn:epcglobal:epcis:mda:event_name",
            notification.getNewStringValue());
      } else if (ei.getName().equals("description")) {
        ebproc.setDescription(notification.getNewStringValue());
      } else {
        return;
      }

      mc.saveObject();
    }
  }
 @Override
 public void processNotifications(TemporalEdgeManager manager, List<Notification> notifications) {
   for (Notification notification : notifications) {
     Object feature = notification.getFeature();
     // Temporal changes
     //
     if (TemporalPackage.Literals.TEMPORAL_MEMBER__START_TIME == feature
         || TemporalPackage.Literals.TEMPORAL_MEMBER__DURATION == feature
         || TemporalPackage.Literals.TEMPORAL_MEMBER__END_TIME == feature) {
       EActivity eActivity =
           (EActivity) ((TemporalMember) notification.getNotifier()).getPlanElement();
       removeActivityEdges(manager, eActivity);
       addActivityEdges(manager, eActivity);
     }
     // Hierarchy changes
     //
     if (PlanPackage.Literals.EPLAN_PARENT__CHILDREN == feature
         || PlanPackage.Literals.EACTIVITY__CHILDREN == feature) {
       for (EActivity activity : EMFUtils.getAddedObjects(notification, EActivity.class)) {
         addActivityEdges(manager, activity);
       }
       for (EActivity activity : EMFUtils.getRemovedObjects(notification, EActivity.class)) {
         removeActivityEdges(manager, activity);
       }
     }
   }
 }
 @Override
 public void notifyChanged(Notification msg) {
   logger.trace("[Dependant: " + derivedFeature.getName() + "] New notification: " + msg);
   if (msg.getFeature().equals(dependantFeature)) {
     refreshDerivedFeature();
   }
 }
 /**
  * {@inheritDoc}
  *
  * @see
  *     org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updatePart(org.eclipse.emf.common.notify.Notification)
  */
 @Override
 public void updatePart(final Notification msg) {
   if (this.editingPart.isVisible()) {
     final ForeignKeyElementPropertiesEditionPart foreignKeyElementPart =
         (ForeignKeyElementPropertiesEditionPart) this.editingPart;
     if (DatabasePackage.eINSTANCE.getDatabaseElement_Comments().equals(msg.getFeature())
         && (foreignKeyElementPart != null)
         && this.isAccessible(DatabaseViewsRepository.ForeignKeyElement.Properties.comments)) {
       if (msg.getNewValue() != null) {
         foreignKeyElementPart.setComments(
             EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
       } else {
         foreignKeyElementPart.setComments("");
       }
     }
     if (DatabasePackage.eINSTANCE.getForeignKeyElement_FkColumn().equals(msg.getFeature())
         && (foreignKeyElementPart != null)
         && this.isAccessible(DatabaseViewsRepository.ForeignKeyElement.Properties.fKColumn)) {
       foreignKeyElementPart.setFKColumn((EObject) msg.getNewValue());
     }
     if (DatabasePackage.eINSTANCE.getForeignKeyElement_PkColumn().equals(msg.getFeature())
         && (foreignKeyElementPart != null)
         && this.isAccessible(DatabaseViewsRepository.ForeignKeyElement.Properties.pKColumn)) {
       foreignKeyElementPart.setPKColumn((EObject) msg.getNewValue());
     }
     if (DatabasePackage.eINSTANCE.getNamedElement_Name().equals(msg.getFeature())
         && (foreignKeyElementPart != null)
         && this.isAccessible(DatabaseViewsRepository.ForeignKeyElement.Properties.sourceTable)) {
       if (msg.getNewValue() != null) {
         foreignKeyElementPart.setSourceTable(
             EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
       } else {
         foreignKeyElementPart.setSourceTable("");
       }
     }
     if (DatabasePackage.eINSTANCE.getNamedElement_Name().equals(msg.getFeature())
         && (foreignKeyElementPart != null)
         && this.isAccessible(DatabaseViewsRepository.ForeignKeyElement.Properties.targetTable)) {
       if (msg.getNewValue() != null) {
         foreignKeyElementPart.setTargetTable(
             EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
       } else {
         foreignKeyElementPart.setTargetTable("");
       }
     }
   }
 }
 @Override
 public void notifyChanged(Notification msg) {
   Object feature = msg.getFeature();
   // Change made from Menu Action
   if (feature == IArchimatePackage.Literals.DIAGRAM_MODEL__CONNECTION_ROUTER_TYPE) {
     refreshControls();
   }
 }
Exemple #26
0
 @Override
 public void notifyChanged(Notification msg) {
   Object feature = msg.getFeature();
   // Color event (From Undo/Redo and here)
   if (feature == FEATURE || feature == IArchimatePackage.Literals.LOCKABLE__LOCKED) {
     refreshControls();
   }
 }
 /*
  * (non-Javadoc)
  *
  * @see org.eclipse.emf.common.notify.Adapter#notifyChanged(org.eclipse.emf.common.notify.Notification)
  */
 public void notifyChanged(Notification aNotification) {
   if (aNotification.getFeature()
       == ComponentcorePackage.eINSTANCE.getComponentResource_SourcePath()) {
     if (aNotification.getEventType() == Notification.SET) {
       resource = null;
     }
   }
 }
 /**
  * add notification about trigger
  *
  * @see
  *     org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy#notifyChanged(org.eclipse.emf.common.notify.Notification)
  * @param notification
  */
 @Override
 public void notifyChanged(Notification notification) {
   // TODO Auto-generated method stub
   super.notifyChanged(notification);
   if (UMLPackage.eINSTANCE.getAcceptEventAction_Trigger().equals(notification.getFeature())) {
     refreshStereotypeDisplay();
   }
 }
Exemple #29
0
 @Override
 public void notifyChanged(Notification msg) {
   Object feature = msg.getFeature();
   // Model event (Undo/Redo and here)
   if (feature == IArchimatePackage.Literals.LOCKABLE__LOCKED) {
     refreshLockedButton();
   }
 }
 /** @generated */
 protected void handleNotificationEvent(Notification event) {
   if (event.getNotifier() == getModel()
       && EcorePackage.eINSTANCE.getEModelElement_EAnnotations().equals(event.getFeature())) {
     handleMajorSemanticChange();
   } else {
     super.handleNotificationEvent(event);
   }
 }