Tabnine Logo
EcoreUtil$Copier.copyAll
Code IndexAdd Tabnine to your IDE (free)

How to use
copyAll
method
in
org.eclipse.emf.ecore.util.EcoreUtil$Copier

Best Java code snippets using org.eclipse.emf.ecore.util.EcoreUtil$Copier.copyAll (Showing top 10 results out of 315)

origin: org.eclipse.uml2/org.eclipse.uml2.uml

@Override
public <T> Collection<T> copyAll(Collection<? extends T> eObjects) {
  Collection<T> result = new ArrayList<T>(eObjects.size());
  for (Object object : eObjects) {
    @SuppressWarnings("unchecked")
    T copy = (T) copy((EObject) object);
    result.add(copy);
    for (TreeIterator<EObject> eAllContents = ((EObject) object)
      .eAllContents(); eAllContents.hasNext();) {
      EObject childEObject = eAllContents.next();
      if (childEObject instanceof Element) {
        @SuppressWarnings("unchecked")
        Collection<T> copies = (Collection<T>) super
          .copyAll(((Element) childEObject)
            .getStereotypeApplications());
        result.addAll(copies);
      }
    }
  }
  return result;
}
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore.change

Collection<EObject> newObjectsToAttach = copier.copyAll(objectsToDetach);
copier.copyReferences();
origin: org.eclipse.emf/org.eclipse.emf.ecore.change

Collection<EObject> newObjectsToAttach = copier.copyAll(objectsToDetach);
copier.copyReferences();
origin: org.eclipse.emf/org.eclipse.emf.ecore.xmi

copier.copyAll(propertyFeatureList);
copier.copyReferences();
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore.xmi

copier.copyAll(propertyFeatureList);
copier.copyReferences();
origin: org.eclipse.emf/org.eclipse.emf.ecore

/**
 * Called to handle the copying of a containment feature;
 * this adds a list of copies or sets a single copy as appropriate for the multiplicity.
 * @param eReference the feature to copy.
 * @param eObject the object from which to copy.
 * @param copyEObject the object to copy to.
 */
protected void copyContainment(EReference eReference, EObject eObject, EObject copyEObject)
{
 if (eObject.eIsSet(eReference))
 {
  EStructuralFeature.Setting setting = getTarget(eReference, eObject, copyEObject);
  if (setting != null)
  {
   Object value = eObject.eGet(eReference);
   if (eReference.isMany())
   {
    @SuppressWarnings("unchecked")
    List<EObject> target = (List<EObject>)value;
    setting.set(copyAll(target));
   }
   else
   {
    setting.set(copy((EObject)value));
   }
  }
 }
}
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore

/**
 * Called to handle the copying of a containment feature;
 * this adds a list of copies or sets a single copy as appropriate for the multiplicity.
 * @param eReference the feature to copy.
 * @param eObject the object from which to copy.
 * @param copyEObject the object to copy to.
 */
protected void copyContainment(EReference eReference, EObject eObject, EObject copyEObject)
{
 if (eObject.eIsSet(eReference))
 {
  EStructuralFeature.Setting setting = getTarget(eReference, eObject, copyEObject);
  if (setting != null)
  {
   Object value = eObject.eGet(eReference);
   if (eReference.isMany())
   {
    @SuppressWarnings("unchecked")
    List<EObject> target = (List<EObject>)value;
    setting.set(copyAll(target));
   }
   else
   {
    setting.set(copy((EObject)value));
   }
  }
 }
}
origin: org.eclipse/xtext

/**
 * copies contents of a resource set into a new one
 */
public static <T extends ResourceSet> T clone(T target, ResourceSet source) {
  EList<Resource> resources = source.getResources();
  EcoreUtil.Copier copier = new EcoreUtil.Copier();
  for (Resource resource : resources) {
    Resource resource2 = target.createResource(resource.getURI());
    resource2.getContents().addAll(copier.copyAll(resource.getContents()));
  }
  copier.copyReferences();
  return target;
}
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore

/**
 * Returns a collection of the self-contained copies of each {@link EObject} in eObjects.
 * @param eObjects the collection of objects to copy.
 * @return the collection of copies.
 * @see Copier
 */
public static <T> Collection<T> copyAll(Collection<? extends T> eObjects)
{
 Copier copier = new Copier();
 Collection<T> result = copier.copyAll(eObjects);
 copier.copyReferences();
 return result;
}
origin: org.eclipse.emf/org.eclipse.emf.ecore

/**
 * Returns a collection of the self-contained copies of each {@link EObject} in eObjects.
 * @param eObjects the collection of objects to copy.
 * @return the collection of copies.
 * @see Copier
 */
public static <T> Collection<T> copyAll(Collection<? extends T> eObjects)
{
 Copier copier = new Copier();
 Collection<T> result = copier.copyAll(eObjects);
 copier.copyReferences();
 return result;
}
org.eclipse.emf.ecore.utilEcoreUtil$CopiercopyAll

Javadoc

Returns a collection containing a copy of each EObject in the given collection.

Popular methods of EcoreUtil$Copier

  • copyReferences
    Hooks up cross references; it delegates to #copyReference.
  • copy
    Returns a copy of the given eObject.
  • get
  • <init>
    Creates an instance that resolves proxies or not and uses non-copied references or not as specified.
  • copyAttribute
    Called to handle the copying of an attribute; this adds a list of values or sets a single value as a
  • entrySet
  • copyContainment
    Called to handle the copying of a containment feature; this adds a list of copies or sets a single c
  • copyReference
    Called to handle the copying of a cross reference; this adds values or sets a single value as approp
  • createCopy
    Returns a new instance of the object's target class.
  • copyAttributeValue
    Called to handle copying of an attribute's value to the target setting.
  • copyFeatureMap
    Call to handle copying the contained objects within a feature map.
  • copyProxyURI
    Copies the proxy URI from the original to the copy, if present.
  • copyFeatureMap,
  • copyProxyURI,
  • getTarget,
  • put

Popular in Java

  • Start an intent from android
  • setRequestProperty (URLConnection)
  • onRequestPermissionsResult (Fragment)
  • runOnUiThread (Activity)
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • JPanel (javax.swing)
  • JTable (javax.swing)
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now