コード例 #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()) {
     SkillPropertiesEditionPart basePart = (SkillPropertiesEditionPart) editingPart;
     if (EefPrimerPackage.eINSTANCE.getSkill_Name().equals(msg.getFeature())
         && msg.getNotifier().equals(semanticObject)
         && basePart != null
         && isAccessible(EefprimerViewsRepository.Skill.Properties.name)) {
       if (msg.getNewValue() != null) {
         basePart.setName(
             EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
       } else {
         basePart.setName("");
       }
     }
   }
 }
コード例 #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 Skill skill = (Skill) elt;
      final SkillPropertiesEditionPart basePart = (SkillPropertiesEditionPart) editingPart;
      // init values
      if (isAccessible(EefprimerViewsRepository.Skill.Properties.name))
        basePart.setName(
            EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, skill.getName()));

      // init filters

      // init values for referenced views

      // init filters for referenced views

    }
    setInitializing(false);
  }