Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 41681 Details for
Bug 142115
Copy/Paste infrastructure should call EcoreUtil#remove() before adding pasted EObjects to new containers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
patch as described in bug
patch_ClipboardSupportUtil.txt (text/plain), 2.22 KB, created by
Nicholas Bennett
on 2006-05-16 20:36:20 EDT
(
hide
)
Description:
patch as described in bug
Filename:
MIME Type:
Creator:
Nicholas Bennett
Created:
2006-05-16 20:36:20 EDT
Size:
2.22 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.gmf.runtime.emf.clipboard.core >Index: src/org/eclipse/gmf/runtime/emf/clipboard/core/ClipboardSupportUtil.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.runtime.emf.clipboard.core/src/org/eclipse/gmf/runtime/emf/clipboard/core/ClipboardSupportUtil.java,v >retrieving revision 1.7 >diff -u -r1.7 ClipboardSupportUtil.java >--- src/org/eclipse/gmf/runtime/emf/clipboard/core/ClipboardSupportUtil.java 23 Dec 2005 20:17:45 -0000 1.7 >+++ src/org/eclipse/gmf/runtime/emf/clipboard/core/ClipboardSupportUtil.java 16 May 2006 23:05:38 -0000 >@@ -28,6 +28,7 @@ > import org.eclipse.emf.ecore.EStructuralFeature; > import org.eclipse.emf.ecore.InternalEObject; > import org.eclipse.emf.ecore.resource.Resource; >+import org.eclipse.emf.ecore.util.EcoreUtil; > import org.eclipse.emf.ecore.util.ExtendedMetaData; > import org.eclipse.emf.ecore.util.FeatureMapUtil; > import org.eclipse.emf.ecore.xmi.XMLResource; >@@ -124,6 +125,10 @@ > > if (isOkToSetEList(eObject, reference)) { > if (reference.isContainment()) { >+ for (Iterator referenced = referencedObjects.iterator();referenced.hasNext();) { >+ EObject referencedObject = (EObject)referenced.next(); >+ EcoreUtil.remove(referencedObject); >+ } > sendCreateEvent(referencedObjects); > } > eObject.eSet(reference, referencedObjects); >@@ -223,6 +228,7 @@ > return null; > } > if (reference.isContainment()) { >+ EcoreUtil.remove(referencedObject); > sendCreateEvent(referencedObject); > } > ((Collection) eObject.eGet(reference)).add(referencedObject); >@@ -240,6 +246,7 @@ > * > */ > public static EObject appendEObject(Resource resource, EObject referencedObject) { >+ EcoreUtil.remove(referencedObject); > sendCreateEvent(referencedObject); > resource.getContents().add(referencedObject); > return referencedObject; >@@ -264,6 +271,7 @@ > return null; > } > if (reference.isContainment()) { >+ EcoreUtil.remove(referencedObject); > sendCreateEvent(referencedObject); > } > eObject.eSet(reference, referencedObject);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 142115
: 41681