Commit 1e2fe2a0 authored by Simon Barner's avatar Simon Barner
Browse files

Fix NPE when copying top-level elements from one project to another.

refs 2347
parent 09951c1f b41f60eef8464224b98b0b62fd30221be4686a4d GREEN b41f60eef8464224b98b0b62fd30221be4686a4d GREEN 40a2893754ec8923a84889c7f5ae33873ccc3332 GREEN 40a2893754ec8923a84889c7f5ae33873ccc3332 GREEN 0c15b009bc7731dbd34349480d6bfa14af29e1b6 GREEN 6c6c090f3c61854ce1a2331a710e23a18eaccd37 YELLOW 2d27702d42ae7d89922af314be20e18e771d107f GREEN 2d27702d42ae7d89922af314be20e18e771d107f GREEN fc8b7667405f329a05ce60428161e4d096d6547c GREEN fc8b7667405f329a05ce60428161e4d096d6547c GREEN 8e74691388cc7e19af23e6eae03460184cf179e5 GREEN 8e74691388cc7e19af23e6eae03460184cf179e5 GREEN
...@@ -237,14 +237,15 @@ public class CopyPasteUtils { ...@@ -237,14 +237,15 @@ public class CopyPasteUtils {
/** /**
* Creates a @{link {@link EList} of the eContents of the current {@link EObject} and the * Creates a @{link {@link EList} of the eContents of the current {@link EObject} and the
* eConents of its container. * eContents of its container.
*/ */
private static EList<EObject> getContentsAtTwoLevels(EObject target) { private static EList<EObject> getContentsAtTwoLevels(EObject target) {
EList<EObject> containtsOfContainer = target.eContainer().eContents();
EList<EObject> contents = target.eContents();
EList<EObject> allContents = new BasicEList<EObject>(); EList<EObject> allContents = new BasicEList<EObject>();
allContents.addAll(contents); if(target.eContainer() != null) {
return allContents; return allContents;
} }
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment