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

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

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

origin: org.eclipse.emf/org.eclipse.emf.ecore.change

Collection<EObject> newObjectsToAttach = copier.copyAll(objectsToDetach);
copier.copyReferences();
 EObject copiedObjectToChange = copier.get(objectToChange);
    featureChange.setReferenceValue(copier.get(referenceValue));
      referenceValues.set(copier.get(referenceValue));
   referenceValues.set(copier.get(referenceValue));
origin: io.sarl.lang/io.sarl.lang

final EObject result = super.copy(eobject);
if (result instanceof JvmWildcardTypeReference) {
  final JvmWildcardTypeReference wildcardType = (JvmWildcardTypeReference) result;
origin: de.dfki.cos.basys.common/de.dfki.cos.basys.common.emf

EObject oldInstance = instance;
instance = EmfUtils.clone(instance);
Copier copier = new Copier(false, false);
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore.change

Collection<EObject> newObjectsToAttach = copier.copyAll(objectsToDetach);
copier.copyReferences();
 EObject copiedObjectToChange = copier.get(objectToChange);
    featureChange.setReferenceValue(copier.get(referenceValue));
      referenceValues.set(copier.get(referenceValue));
   referenceValues.set(copier.get(referenceValue));
origin: org.eclipse.emf/org.eclipse.emf.codegen.ecore

EPackage outputPackage = (EPackage)copier.copy(originalPackage);
copier.copyReferences();
outputResource.getContents().add(outputPackage);
collapseEmptyPackages(outputPackage);
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore

EStructuralFeature.Setting setting = getTarget(eReference, eObject, copyEObject);
if (setting != null)
    EObject copyReferencedEObject = get(referencedEObject);
    if (copyReferencedEObject == null)
   Object copyReferencedEObject = get(value);
   if (copyReferencedEObject == null)
origin: org.eclipse.emf/org.eclipse.emf.ecore.xmi

copier.copyAll(propertyFeatureList);
copier.copyReferences();
for (Map.Entry<EObject, EObject> entry : copier.entrySet())
  EObject copyEObject = copier.get(targetEObject);
  if (copyEObject != null)
origin: org.eclipse.emf/org.eclipse.emf.ecore

for (Map.Entry<EObject, EObject> entry  : entrySet())
    if (!eReference.isContainment() && !eReference.isContainer())
     copyReference(eReference, eObject, copyEObject);
    FeatureMap copyFeatureMap = (FeatureMap)getTarget(eStructuralFeature, eObject, copyEObject);
    if (copyFeatureMap != null)
       Object copyReferencedEObject = get(referencedEObject);
       if (copyReferencedEObject == null && referencedEObject != null)
       copyFeatureMap.add(getTarget(featureMap.getEStructuralFeature(k)), featureMap.getValue(k));
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore.xmi

copier.copyAll(propertyFeatureList);
copier.copyReferences();
for (Map.Entry<EObject, EObject> entry : copier.entrySet())
  EObject copyEObject = copier.get(targetEObject);
  if (copyEObject != null)
origin: org.eclipse.emf/org.eclipse.emf.ecore

EStructuralFeature.Setting setting = getTarget(eReference, eObject, copyEObject);
if (setting != null)
    EObject copyReferencedEObject = get(referencedEObject);
    if (copyReferencedEObject == null)
   Object copyReferencedEObject = get(value);
   if (copyReferencedEObject == null)
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore

for (Map.Entry<EObject, EObject> entry  : entrySet())
    if (!eReference.isContainment() && !eReference.isContainer())
     copyReference(eReference, eObject, copyEObject);
    FeatureMap copyFeatureMap = (FeatureMap)getTarget(eStructuralFeature, eObject, copyEObject);
    if (copyFeatureMap != null)
       Object copyReferencedEObject = get(referencedEObject);
       if (copyReferencedEObject == null && referencedEObject != null)
       copyFeatureMap.add(getTarget(featureMap.getEStructuralFeature(k)), featureMap.getValue(k));
origin: io.sarl.lang/io.sarl.lang

final JvmTypeReference copy = (JvmTypeReference) copier.copy(type);
copier.copyReferences();
return copy;
origin: org.eclipse.xtext/org.eclipse.xtext.xbase

T copy = (T) copier.copy(original);
copier.copyReferences();
return copy;
origin: org.eclipse.uml2/org.eclipse.uml2.uml

    (StructuralFeature) eObject);
} else {
  super.copyAttribute(eAttribute, eObject, copyEObject);
super.copyAttribute(eAttribute, eObject, copyEObject);
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore

EObject copyEObject = createCopy(eObject);
if (copyEObject != null)
 put(eObject, copyEObject);
 EClass eClass = eObject.eClass();
 for (int i = 0, size = eClass.getFeatureCount(); i < size; ++i)
    copyAttribute((EAttribute)eStructuralFeature, eObject, copyEObject);
    if (eReference.isContainment())
     copyContainment(eReference, eObject, copyEObject);
 copyProxyURI(eObject, copyEObject);
origin: org.eclipse.xtext/org.eclipse.xtext.xtext.generator

AbstractElement clone = (AbstractElement) copier.copy(element);
copier.copyReferences();
return clone;
origin: org.eclipse.emf/org.eclipse.emf.ecore

EObject copyEObject = createCopy(eObject);
if (copyEObject != null)
 put(eObject, copyEObject);
 EClass eClass = eObject.eClass();
 for (int i = 0, size = eClass.getFeatureCount(); i < size; ++i)
    copyAttribute((EAttribute)eStructuralFeature, eObject, copyEObject);
    if (eReference.isContainment())
     copyContainment(eReference, eObject, copyEObject);
 copyProxyURI(eObject, copyEObject);
origin: org.eclipse.xtext/org.eclipse.xtext.xtext.generator

AbstractElement clone = (AbstractElement) copier.copy(result);
copier.copyReferences();
return clone;
origin: org.eclipse.mylyn.builds/core

public void merge(BuildPlan source) {
  Assert.isNotNull(source);
  @SuppressWarnings("serial")
  EcoreUtil.Copier copier = new EcoreUtil.Copier() {
    @Override
    protected EObject createCopy(EObject source) {
      return BuildPlan.this; // TODO This will certainly fail for nested plans!
    };
    @Override
    protected void copyAttribute(EAttribute eAttribute, EObject eObject, EObject copyEObject) {
      super.copyAttribute(eAttribute, eObject, copyEObject);
    }
    @Override
    protected void copyContainment(EReference eReference, EObject eObject, EObject copyEObject) {
      // XXX do nothing, throws a ClassCastException due to overridded createCopy() method
    }
  };
  copier.copy(source);
  // FIXME implement proper merge
  getParameterDefinitions().clear();
  getParameterDefinitions().addAll(EcoreUtil.copyAll(source.getParameterDefinitions()));
  getFlags().clear();
  getFlags().addAll(source.getFlags());
  getHealthReports().clear();
  getHealthReports().addAll(EcoreUtil.copyAll(source.getHealthReports()));
  getAttributes().clear();
  getAttributes().putAll(source.getAttributes());
}
origin: org.eclipse.viatra/org.eclipse.viatra.dse

  return copier.copy(eObject);
} else if (notifier instanceof Resource) {
  Resource resource = (Resource) notifier;
    EObject clonedEObject = copier.copy(eObject);
    clonedResource.getContents().add(clonedEObject);
org.eclipse.emf.ecore.utilEcoreUtil$Copier

Javadoc

A mapping building traverser of a collection of EObject#eAllContents; the map is from EObject to EObject, i.e., from original to copy; use EcoreUtil#copy or EcoreUtil#copyAll to do routine copies. Since this implementation extends a Map implementation, it acts as the result of the over all copy. The client can call #copy and #copyAll repeatedly. When all the objects have been copied, the client should call #copyReferencesto copy the #copyReference EObject#eCrossReferences.
 
Copier copier = new Copier(); 
EObject result = copier.copy(eObject); 
Collection results = copier.copyAll(eObjects); 
copier.copyReferences(); 
The copier delegates to #copyContainment, #copyAttribute during the copy phase and to #copyReference, during the cross reference phase. This allows tailored handling through derivation.

Most used methods

  • copyReferences
    Hooks up cross references; it delegates to #copyReference.
  • copy
    Returns a copy of the given eObject.
  • copyAll
    Returns a collection containing a copy of each EObject in the given collection.
  • 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.
  • copyAttributeValue,
  • copyFeatureMap,
  • copyProxyURI,
  • getTarget,
  • put

Popular in Java

  • Making http requests using okhttp
  • compareTo (BigDecimal)
  • onRequestPermissionsResult (Fragment)
  • runOnUiThread (Activity)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Top 12 Jupyter Notebook extensions
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