Package org.eclipse.emf.ecore

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


      }
      if (oldContainer != documentRoot || oldContainmentReference != rootElement)
      {
        if (oldContainmentReference != null && oldContainmentReference.isMany())
        {
          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 != documentRoot || oldContainmentReference != rootElement)
      {
        if (oldContainmentReference.isMany())
        {
          ((List)oldContainer.eGet(oldContainmentReference)).add(oldContainmentIndex, rootObject);
        }
        else
        {
          oldContainer.eSet(oldContainmentReference, rootObject);
        }
View Full Code Here

    for (int i = 0, count = result.size(); i < count; ++i)
    {
      EStructuralFeature eStructuralFeature = (EStructuralFeature)result.get(i);
      if (!eStructuralFeature.isDerived() && FeatureMapUtil.isFeatureMap(eStructuralFeature))
      {
        List features = (List)eDataObject.eGet(eStructuralFeature);
        for (int j = 0, size = features.size(); j < size; ++j)
        {
          FeatureMap.Entry entry = (FeatureMap.Entry)features.get(j);
          EStructuralFeature entryFeature = entry.getEStructuralFeature();
          result.add(entryFeature);
View Full Code Here

        {
          feature = (EStructuralFeature)DataObjectUtil.getOpenFeature(eObject, attributeName);
        }
        if (feature != null)
        {
          Object test = eObject.eGet(feature, true);
          if (test != null)
          {
            String testString = EcoreUtil.convertToString((EDataType)feature.getEType(), test);
            if (attributeValue.equals(testString))
            {
View Full Code Here

     * @generated
     */
    @SuppressWarnings("unchecked")
    public EMap<Interaction, Boolean> getEMap() {
        EObject container = eContainer();
        return container == null ? null : (EMap<Interaction, Boolean>) container
                .eGet(eContainmentFeature());
    }

} //InteractionToEBooleanObjectMapEntryImpl
View Full Code Here

    while (it.hasNext()) {
      EObject underTest = it.next();
      for (EAttribute attr : underTest.eClass().getEAllAttributes()) {
        if (attr.getEType() == DescriptionPackage.eINSTANCE
            .getInterpretedExpression()) {
          Object expr = underTest.eGet(attr);
          if (expr instanceof String && ((String) expr).length() > 0) {
            parameters
                .add(new Object[] { new InterpretedExpression(
                    (String) expr, underTest, attr) });
            allExpressions.add((String) expr);
View Full Code Here

      // to object
     
      for (EReference ref : target.eClass().getEAllReferences()) {
        if (ref.isMany()) {
          // it's a list (assumed)
          EList<Object> resolved = (EList<Object>) target.eGet(ref);
          if (resolved.contains(object)) {
            // delete the reference
            // resolved.delete(object);
            toDeleteLists.add(resolved);
          }
View Full Code Here

            // delete the reference
            // resolved.delete(object);
            toDeleteLists.add(resolved);
          }
        } else {
          Object resolved = target.eGet(ref);
          if (object.equals(resolved)) {
            // unset the reference
            // target.eUnset(ref);
            if (toDeleteReferences.get(ref) == null) {
              toDeleteReferences.put(ref, new ArrayList<EObject>());
View Full Code Here

    EClass docEClass = ExtendedMetaData.INSTANCE.getDocumentRoot(testPackage);
    EObject doc = EcoreUtil.create(docEClass);
    resource.getContents().add(doc);
   
    EStructuralFeature docMixedFeature = ExtendedMetaData.INSTANCE.getMixedFeature(docEClass);
    FeatureMap docMixed = (FeatureMap) doc.eGet(docMixedFeature);
    AnyType test = (AnyType) EcoreUtil.create(XMLTypePackage.Literals.ANY_TYPE);
    docMixed.add(ExtendedMetaData.INSTANCE.demandFeature("urn:test", "test", true), test);
    SimpleAnyType subTest1 = (SimpleAnyType) EcoreUtil.create(XMLTypePackage.Literals.SIMPLE_ANY_TYPE);
    test.getMixed().add(ExtendedMetaData.INSTANCE.demandFeature("urn:test", "subTest", true), subTest1);
    subTest1.setInstanceType(XMLTypePackage.Literals.STRING);
View Full Code Here

        EObject e = it.next();
        EClass cls = e.eClass();
        // check all attributes
        for (EAttribute attr : cls.getEAllAttributes()) {
          // is it non-default?
          if (e.eGet(attr) != attr.getDefaultValue()) {
            // yes; remove it from the unused features (if it exists)
            EClass container = attr.getEContainingClass();
            unusedSuperClassFeaturesMap.get(cls).remove(container);
          }
        }
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.