Package org.eclipse.emf.ecore

Examples of org.eclipse.emf.ecore.EObject.eGet()


      EStructuralFeature eStructuralFeature = setting.getEStructuralFeature();
      if (eStructuralFeature.isChangeable())
      {
        if (eStructuralFeature.isMany())
        {
          List refList = (List)referencingEObject.eGet(eStructuralFeature);
          int refIndex = refList.indexOf(oldEObject);
          if (refIndex != -1) refList.set(refIndex, newEObject);
        }
        else
        {
View Full Code Here


      FeatureChange featureChange = (FeatureChange)fIter.next();
      featureChange.apply(oldDataObject);
      EStructuralFeature feature = featureChange.getFeature();
      if (FeatureMapUtil.isFeatureMap(feature))
      {
        FeatureMap featureMap = (FeatureMap) oldDataObject.eGet(feature);
        for (int index = featureMap.size(); index != 0;)
          if (isContainmentReference(featureMap.getEStructuralFeature(--index)))
            featureMap.setValue(index, getOldDataObject((DataObject) featureMap.getValue(index)));
      }
      else if (isContainmentReference(feature))
View Full Code Here

          if (isContainmentReference(featureMap.getEStructuralFeature(--index)))
            featureMap.setValue(index, getOldDataObject((DataObject) featureMap.getValue(index)));
      }
      else if (isContainmentReference(feature))
      {
        Object value = oldDataObject.eGet(feature);
        if (feature.isMany())
        {
          changes = (List) value;
          for (int index = changes.size(); index != 0;)
            changes.set(--index, getOldDataObject((DataObject) changes.get(index))); // Java pushes stack from left to right
View Full Code Here

              }
            }
            else if (FeatureMapUtil.isFeatureMap(eStructuralFeature))
            {
              FeatureMap featureMap = (FeatureMap)eObject.eGet(eStructuralFeature);
              FeatureMap copyFeatureMap = (FeatureMap)copyEObject.eGet(getTarget(eStructuralFeature));
              int copyFeatureMapSize = copyFeatureMap.size();
              for (int k = 0, featureMapSize = featureMap.size(); k < featureMapSize; ++k)
              {
                EStructuralFeature feature = featureMap.getEStructuralFeature(k);
                if (feature instanceof EReference)
View Full Code Here

          // use namespace declarations defined in the document (if any)
          EObject eRootObject = eDataGraph.getERootObject();
          EReference xmlnsPrefixMapFeature = extendedMetaData.getXMLNSPrefixMapFeature(eRootObject.eClass());
          if (xmlnsPrefixMapFeature != null)
          {
            EMap xmlnsPrefixMap = (EMap)eRootObject.eGet(xmlnsPrefixMapFeature);
            helper.setPrefixToNamespaceMap(xmlnsPrefixMap);
          }
          ChangeSummary changeSummary = eDataGraph.getEChangeSummary();

          if (changeSummary != null)
View Full Code Here

        {
          oldContainmentIndex = oldResource.getContents().indexOf(rootObject);
          oldResource.getContents().remove(oldContainmentIndex);
        }
        else if (oldContainmentReference != null && FeatureMapUtil.isMany(oldContainer, oldContainmentReference))
          oldContainmentIndex = ((List)oldContainer.eGet(oldContainmentReference)).indexOf(rootObject);
       
        Object rootValue =
          rootElement instanceof EAttribute && rootObject instanceof SimpleAnyTypeDataObject ?
            ((SimpleAnyTypeDataObject)rootObject).getValue() : rootObject;
           
View Full Code Here

      if (oldContainer != null)
      {
        if (oldContainer != documentRoot || oldContainmentReference != rootElement)
        {
          if (FeatureMapUtil.isMany(oldContainer, oldContainmentReference))
            ((List)oldContainer.eGet(oldContainmentReference)).add(oldContainmentIndex, rootObject);
          else
            oldContainer.eSet(oldContainmentReference, rootObject);
        }
      }
      else if (documentRoot != null)
View Full Code Here

    if (feature.isMany())
    {
      if (value == null)
      {
        EObject eObject = (EObject)((Map.Entry)eContainer()).getKey();
        value = getListValue((EList)eObject.eGet(feature));
      }
      return value;
    }
    else
    {
View Full Code Here

          // use namespace declarations defined in the document (if any)
          EObject eRootObject = eDataGraph.getERootObject();
          EReference xmlnsPrefixMapFeature = extendedMetaData.getXMLNSPrefixMapFeature(eRootObject.eClass());
          if (xmlnsPrefixMapFeature != null)
          {
            EMap xmlnsPrefixMap = (EMap)eRootObject.eGet(xmlnsPrefixMapFeature);
            helper.setPrefixToNamespaceMap(xmlnsPrefixMap);
          }
          ChangeSummary changeSummary = eDataGraph.getEChangeSummary();

          if (changeSummary != null)
View Full Code Here

          // use namespace declarations defined in the document (if any)
          EObject eRootObject = eDataGraph.getERootObject();
          EReference xmlnsPrefixMapFeature = extendedMetaData.getXMLNSPrefixMapFeature(eRootObject.eClass());
          if (xmlnsPrefixMapFeature != null)
          {
            EMap xmlnsPrefixMap = (EMap)eRootObject.eGet(xmlnsPrefixMapFeature);
            helper.setPrefixToNamespaceMap(xmlnsPrefixMap);
          }
          ChangeSummary changeSummary = eDataGraph.getEChangeSummary();

          if (changeSummary != null)
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.