Package org.eclipse.emf.ecore

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


            {
              EGenericType otherEGenericType = eGenericTypes[i];
              if (otherEGenericType.getEClassifier() == eContainer)
              {
                EList<EGenericType> eTypeArguments = otherEGenericType.getETypeArguments();
                int index = ((List<?>)eContainer.eGet(eTypeParameter.eContainmentFeature())).indexOf(eTypeParameter);
                if (index < eTypeArguments.size())
                {
                  return resolve(eTypeArguments.get(index));
                }
              }
View Full Code Here


            {
              EGenericType otherEGenericType = eGenericTypes[i];
              if (otherEGenericType.getEClassifier() == eContainer)
              {
                EList<EGenericType> eTypeArguments = otherEGenericType.getETypeArguments();
                int index = ((List<?>)eContainer.eGet(eTypeParameter.eContainmentFeature())).indexOf(eTypeParameter);
                if (index < eTypeArguments.size())
                {
                  return resolve(eTypeArguments.get(index));
                }
              }
View Full Code Here

        EStructuralFeature emofFeature = (EStructuralFeature)entry.getKey();
        EStructuralFeature ecoreFeature = (EStructuralFeature)entry.getValue();
        resource.setID(ecoreFeature, resource.getID(emofFeature));
        EObject eObject = emofFeature.eContainer();
        @SuppressWarnings("unchecked")
        List<EObject> list = (List<EObject>)eObject.eGet(emofFeature.eContainmentFeature());
        list.set(list.indexOf(emofFeature), ecoreFeature);
      }

      for (TreeIterator<Notifier> contents = EcoreUtil.getAllContents(resource.getContents(), false); contents.hasNext(); )
      {
View Full Code Here

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

} //EStringToStringMapEntryImpl
View Full Code Here

  public List<XMIException> setManyReference(ManyReference reference, String location)
  {
    EStructuralFeature feature = reference.getFeature();
    int kind = getFeatureKind(feature);
    EObject object = reference.getObject();
    @SuppressWarnings("unchecked") InternalEList<Object> list = (InternalEList<Object>)object.eGet(feature);
    List<XMIException> xmiExceptions = new BasicEList<XMIException>();
    Object[] values = reference.getValues();
    int[] positions = reference.getPositions();

    if (kind == IS_MANY_ADD)
View Full Code Here

      if (stereotype != null) {
        Object value = stereotypedElement.getValue(stereotype, "host");
        if (value != null && value instanceof EObject) {
          EObject temp = (EObject) value;
          EStructuralFeature feature = temp.eClass().getEStructuralFeature("base_Classifier");
          if (temp.eGet(feature) instanceof Artifact) host = (Artifact) temp.eGet(feature);
        }
       
        value = stereotypedElement.getValue(stereotype, "hostDemand");
        if (value != null) {
          if (value instanceof Collection) {
View Full Code Here

      if (stereotype != null) {
        Object value = stereotypedElement.getValue(stereotype, "host");
        if (value != null && value instanceof EObject) {
          EObject temp = (EObject) value;
          EStructuralFeature feature = temp.eClass().getEStructuralFeature("base_Classifier");
          if (temp.eGet(feature) instanceof Artifact) host = (Artifact) temp.eGet(feature);
        }
       
        value = stereotypedElement.getValue(stereotype, "hostDemand");
        if (value != null) {
          if (value instanceof Collection) {
View Full Code Here

      boolean idSpecifiedByClient = useIdAttributeAsPrimaryKey != null && useIdAttributeAsPrimaryKey && idAttribute != null;

      if (idSpecifiedByClient)
      {
        // Use the ID attribute value as the id
        id = eObject.eGet(idAttribute);
        dbObject.put(Keywords.ID_KEY, id);
      }

      if (writeConcern == null)
        collection.insert(dbObject);
View Full Code Here

          treeViewer.refresh(true);
          return;
        }

        final EObject container = baseElement.eContainer();
        final Object eGet = container.eGet(baseElement.eContainingFeature());
        TransactionalEditingDomain domain = diagramEditor.getEditingDomain();

        domain.getCommandStack().execute(new RecordingCommand(domain) {
          @SuppressWarnings("rawtypes")
          @Override
View Full Code Here

        for (int i = 0; i < objects.size(); i++) {
            EObject eobject = (EObject) objects.get(i);
            EStructuralFeature feature = feature(eobject, property);

            values.add(eobject.eGet(feature));
        }

        return values;
    }
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.