Examples of eAdapters()


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

         
          for (Iterator iter = extendedObjects.iterator(); iter.hasNext();) {
            EObject element = (EObject) iter.next();
           
            List remove = new BasicEList();
            for (Iterator iterator = element.eAdapters().iterator(); iterator.hasNext();) {
              Adapter adapter = (Adapter) iterator.next();
              if(adapter instanceof ExtendedObjectUserAdapter ||
                  adapter instanceof ExtendedObjectAdapter)
                remove.add(adapter);
            }
View Full Code Here

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

              Adapter adapter = (Adapter) iterator.next();
              if(adapter instanceof ExtendedObjectUserAdapter ||
                  adapter instanceof ExtendedObjectAdapter)
                remove.add(adapter);
            }
            element.eAdapters().removeAll(remove);
          }
         
          break;
       
        default :
View Full Code Here

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

        modificationTrackingAdapter = createModificationTrackingAdapter();

        for (TreeIterator<EObject> i = getAllProperContents(getContents()); i.hasNext(); )
        {
          EObject eObject = i.next();
          eObject.eAdapters().add(modificationTrackingAdapter);
        }
      }
      else
      {
        Adapter oldModificationTrackingAdapter = modificationTrackingAdapter;
View Full Code Here

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

        modificationTrackingAdapter = null;

        for (TreeIterator<EObject> i = getAllProperContents(getContents()); i.hasNext(); )
        {
          EObject eObject = i.next();
          eObject.eAdapters().remove(oldModificationTrackingAdapter);
        }
      }
    }

    if (eNotificationRequired())
View Full Code Here

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

        modificationTrackingAdapter = createModificationTrackingAdapter();

        for (TreeIterator<EObject> i = getAllProperContents(getContents()); i.hasNext(); )
        {
          EObject eObject = i.next();
          eObject.eAdapters().add(modificationTrackingAdapter);
        }
      }
      else
      {
        Adapter oldModificationTrackingAdapter = modificationTrackingAdapter;
View Full Code Here

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

        modificationTrackingAdapter = null;

        for (TreeIterator<EObject> i = getAllProperContents(getContents()); i.hasNext(); )
        {
          EObject eObject = i.next();
          eObject.eAdapters().remove(oldModificationTrackingAdapter);
        }
      }
    }

    if (eNotificationRequired())
View Full Code Here

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

    Class instanceClass = String.class;
    EList<Adapter> adapters = createMock(EList.class);
    String name = "rule";

    expect(object.eClass()).andReturn(eClass);
    expect(object.eAdapters()).andReturn(adapters);

    expect(eClass.getEStructuralFeature("name")).andReturn(nameFeature);

    expect(nameFeature.isMany()).andReturn(false);
    expect(nameFeature.getEType()).andReturn(eType);
View Full Code Here

Examples of org.eclipse.emf.ecore.InternalEObject.eAdapters()

  public static List<String> resourceOffsets(Resource resource) {
    List<String> result = new ArrayList<String>();
    TreeIterator<Object> iterator = EcoreUtil.getAllContents(resource, true);
    while (iterator.hasNext()) {
      InternalEObject child = (InternalEObject)iterator.next();
      INode node = (INode)child.eAdapters().get(0);
      result.add("" + node.getOffset() + ", " + node.getSemanticElement());
    }
    return result;
  }
 
View Full Code Here

Examples of org.eclipse.emf.ecore.resource.Resource.eAdapters()

      // Don't remove the adapter if the object is in a different resource
      // and that resource (and hence all its contents) are being cross referenced.
      //
      InternalEObject internalEObject = i.next();
      Resource eDirectResource = internalEObject.eDirectResource();
      if (eDirectResource == null || !eDirectResource.eAdapters().contains(this))
      {
        removeAdapter(internalEObject);
      }
    }
  }
View Full Code Here

Examples of org.eclipse.emf.ecore.resource.ResourceSet.eAdapters()

    if (resource != null)
    {
      ResourceSet resourceSet = resource.getResourceSet();
      if (resourceSet != null)
      {
        return (DataGraphImpl)EcoreUtil.getAdapter(resourceSet.eAdapters(), DataGraph.class);
      }
    }
    return 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.