コード例 #1
0
 /**
  * {@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()) {
     DatetimePropertiesEditionPart basePart = (DatetimePropertiesEditionPart) editingPart;
     if (SACMPackage.eINSTANCE.getDatetime_Datetime().equals(msg.getFeature())
         && msg.getNotifier().equals(semanticObject)
         && basePart != null
         && isAccessible(SACMViewsRepository.Datetime.Properties.datetime_)) {
       if (msg.getNewValue() != null) {
         basePart.setDatetime(
             EcoreUtil.convertToString(SACMPackage.Literals.STRING, msg.getNewValue()));
       } else {
         basePart.setDatetime("");
       }
     }
   }
 }
コード例 #2
0
  /**
   * {@inheritDoc}
   *
   * @see
   *     org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object,
   *     int, org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.resource.ResourceSet)
   */
  public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
    setInitializing(true);
    if (editingPart != null && key == partKey) {
      editingPart.setContext(elt, allResource);

      final Datetime datetime = (Datetime) elt;
      final DatetimePropertiesEditionPart basePart = (DatetimePropertiesEditionPart) editingPart;
      // init values
      if (isAccessible(SACMViewsRepository.Datetime.Properties.datetime_))
        basePart.setDatetime(
            EEFConverterUtil.convertToString(SACMPackage.Literals.STRING, datetime.getDatetime()));

      // init filters

      // init values for referenced views

      // init filters for referenced views

    }
    setInitializing(false);
  }