Tabnine Logo
EcoreUtil$Copier.<init>
Code IndexAdd Tabnine to your IDE (free)

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

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

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: 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 self-contained copy of the eObject.
 * @param eObject the object to copy.
 * @return the copy.
 * @see Copier
 */
public static <T extends EObject> T copy(T eObject)
{
 Copier copier = new Copier();
 EObject result = copier.copy(eObject);
 copier.copyReferences();
 
 @SuppressWarnings("unchecked")T t = (T)result;
 return t;
}
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;
}
origin: org.eclipse.emf/org.eclipse.emf.ecore

/**
 * Returns a self-contained copy of the eObject.
 * @param eObject the object to copy.
 * @return the copy.
 * @see Copier
 */
public static <T extends EObject> T copy(T eObject)
{
 Copier copier = new Copier();
 EObject result = copier.copy(eObject);
 copier.copyReferences();
 
 @SuppressWarnings("unchecked")T t = (T)result;
 return t;
}
origin: org.eclipse.viatra/org.eclipse.viatra.dse

/**
 * Clones the given model. Either an {@link EObject}, {@link Resource} or {@link ResourceSet}.
 * @param notifier The root container of the model.
 * @return The cloned model.
 */
public static Notifier clone(Notifier notifier) {
  Copier copier = new Copier();
  Notifier clonedModel = clone(notifier, copier, null);
  copier.copyReferences();
  return clonedModel;
}
origin: org.eclipse/xtext

/**
 * Clones the given EObject without resolving any proxies.
 */
@SuppressWarnings("unchecked")
public static <T extends EObject> T cloneWithProxies(T original) {
  if (original == null)
    return original;
  EcoreUtil.Copier copier = new EcoreUtil.Copier(false);
  T copy = (T) copier.copy(original);
  copier.copyReferences();
  return copy;
}
origin: org.eclipse.mylyn.builds/core

public BuildElement createWorkingCopy() {
  EcoreUtil.Copier copier = new EcoreUtil.Copier();
  BuildElement newElement = (BuildElement) copier.copy(this);
  // FIXME clone containment hierarchy instead
  copier.copyReferences();
  newElement.original = this;
  return newElement;
}
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;
}
org.eclipse.emf.ecore.utilEcoreUtil$Copier<init>

Javadoc

Creates an instance.

Popular methods of EcoreUtil$Copier

  • 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
  • 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
  • runOnUiThread (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • getApplicationContext (Context)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • JFrame (javax.swing)
  • Best IntelliJ plugins
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