Examples of EFactory


Examples of org.eclipse.emf.ecore.EFactory

    ((List)oTestCaseGraph.eGet(oTCGNodes)).add(oNode);
   
    //m_oResourceXMIOut.getContents().add(oTestCaseGraph);
    */
   
    EFactory companyFactory = GeneratedPackage.eINSTANCE.getGeneratedFactory();
   
    EObject oNode = companyFactory.create(GeneratedPackage.eINSTANCE.getTCGNode());
    oNode.eSet(GeneratedPackage.eINSTANCE.getTCGNode_Name(), "testname");
   
    m_oResourceXMIOut.getContents().add(oNode);
    //EObject oTCG = companyFactory.create(GeneratedPackage.eINSTANCE.getTestCaseGraph());
    //oTCG.eSet(GeneratedPackage.eINSTANCE.g, newValue)
View Full Code Here

Examples of org.eclipse.emf.ecore.EFactory

                return null;
            }

            protected void handleUnknownFeature(String prefix, String name, boolean isElement, EObject peekObject, String value) {
                if (objects.size() == 1) {
                    EFactory eFactory;
                    EClassifier type;
                    String typeQName = getXSIType();
                    if (typeQName == null) {
                        type = defaultRootType(prefix, name, isElement, peekObject, value);
                        if (type == null)
View Full Code Here

Examples of org.eclipse.emf.ecore.EFactory

   * <!-- end-user-doc -->
   * @generated
   */
  public NotificationChain basicSetEFactoryInstance(EFactory newEFactoryInstance, NotificationChain msgs)
  {
    EFactory oldEFactoryInstance = eFactoryInstance;
    eFactoryInstance = newEFactoryInstance;
    if (eNotificationRequired())
    {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EcorePackage.EPACKAGE__EFACTORY_INSTANCE, oldEFactoryInstance, newEFactoryInstance);
      if (msgs == null) msgs = notification; else msgs.add(notification);
View Full Code Here

Examples of org.eclipse.emf.ecore.EFactory

      // for performance reasons saveNil and saveElement are not used
      if (!toDOM)
      {
        EDataType d = (EDataType)f.getEType();
        EPackage ePackage = d.getEPackage();
        EFactory fac = ePackage.getEFactoryInstance();
        String name = helper.getQName(f);
        for (int i = 0; i < size; ++i)
        {
          Object value = values.get(i);
          if (value == null)
          {
            doc.startElement(name);
            doc.addAttribute(XSI_NIL, "true");
            doc.endEmptyElement();
            declareXSI = true;
          }
          else
          {       
            String svalue = helper.convertToString(fac, d, value);
            if (escape != null)
            {
              svalue = escape.convert(svalue);
            }
            doc.saveDataValueElement(name, svalue);
          }
        }
      }
      else
      {
        EDataType d = (EDataType)f.getEType();
        EPackage ePackage = d.getEPackage();
        EFactory fac = ePackage.getEFactoryInstance();
        helper.populateNameInfo(nameInfo, f);
        for (int i = 0; i < size; ++i)
        {
          Object value = values.get(i);
          if (value == null)
View Full Code Here

Examples of org.eclipse.emf.ecore.EFactory

    int size = values.size();
    if (size > 0)
    {
      EDataType d = (EDataType)f.getEType();
      EPackage ePackage = d.getEPackage();
      EFactory fac = ePackage.getEFactoryInstance();
      StringBuffer stringValues = new StringBuffer();
      for (int i = 0; i < size; ++i)
      {
        Object value = values.get(i);
        if (value != null)
View Full Code Here

Examples of org.eclipse.emf.ecore.EFactory

    {
      return null;
    }
    EDataType d = (EDataType)f.getEType();
    EPackage ePackage = d.getEPackage();
    EFactory fac = ePackage.getEFactoryInstance();
    String svalue = helper.convertToString(fac, d, value);
    if (escape != null)
    {
      if (isAttribute)
      {
View Full Code Here

Examples of org.eclipse.emf.ecore.EFactory

    if (top)
    {
      handleTopLocations(prefix, name);
    }

    EFactory eFactory = getFactoryForPrefix(prefix);
    String uri =  helper.getURI(prefix);
    if (eFactory == null && prefix.equals("") && uri == null)
    {
      EPackage ePackage = handleMissingPackage(null);
      if (ePackage == null)
View Full Code Here

Examples of org.eclipse.emf.ecore.EFactory

      // Use a pattern that's not possible any other way.
      //
      if (xmlMap != null && (feature = getFeature(peekObject, null, "", true)) != null)
      {

        EFactory eFactory = getFactoryForPrefix(prefix);

        // This is for the case for a local unqualified element that has been bound.
        //
        if (eFactory == null)
        {
          eFactory = feature.getEContainingClass().getEPackage().getEFactoryInstance();
        }

        EObject newObject = null;
        if (useNewMethods)
        {
          newObject = createObject(eFactory, helper.getType(eFactory, name), false);
        }
        else
        {
            newObject = createObjectFromFactory(eFactory, name);
        }
        newObject = validateCreateObjectFromFactory(eFactory, name, newObject, feature);
        if (newObject != null)
        {
          setFeatureValue(peekObject, feature, newObject);
        }
        processObject(newObject);
      }
      else
      {
        // This handles the case of a substitution group.
        //
        if (xmlMap != null)
        {
          EFactory eFactory = getFactoryForPrefix(prefix);
          EObject newObject = createObjectFromFactory(eFactory, name);
          validateCreateObjectFromFactory(eFactory, name, newObject);
          if (newObject != null)
          {
            for (EReference eReference : peekObject.eClass().getEAllReferences())
View Full Code Here

Examples of org.eclipse.emf.ecore.EFactory

    {
      typeName = typeQName;
    }

    contextFeature = feature;
    EFactory eFactory = getFactoryForPrefix(prefix);
    contextFeature = null;

    if (eFactory == null && prefix.equals("") && helper.getURI(prefix) == null)
    {
      contextFeature = feature;
View Full Code Here

Examples of org.eclipse.emf.ecore.EFactory

   * Create an object based on the type of the given feature.
   */
  protected EObject createObjectFromFeatureType(EObject peekObject, EStructuralFeature feature)
  {
    String typeName = null;
    EFactory factory = null;
    EClassifier eType = null;
    EObject obj = null;

    if (feature != null && (eType = feature.getEType()) != 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.