Skip to content
Snippets Groups Projects
Commit 69cf9a9c authored by Simon Barner's avatar Simon Barner
Browse files

GREEN (with minor style changes)

Issue-Ref: 4198
Issue-Url: af3#4198



Signed-off-by: default avatarSimon Barner <barner@fortiss.org>
parent 0023c815
No related branches found
No related tags found
1 merge request!168Fix incomplete copy and paste function of components: Changed clipboard content to store also resource
Pipeline #33416 passed
Pipeline: maven-releng

#33417

    ActionUtils.java 4553e487264e3d1f86f4767da4a7400cce4b9a5d GREEN
    CopyPasteUtils.java 59441b8cf869009200ffec61b60566b595398d89 YELLOW
    CopyPasteUtils.java c60f168d973a0167c0577e7c10ba00629ab2b236 GREEN
    DataBindingUtils.java 631c47881caa13fc567679a7e4416eb777af0713 GREEN
    DragAndDropUtils.java 7aab91518aa12d76533a345bf6ed0be9ac7ff0e5 GREEN
    EObjectSelectionUtils.java 128cf8f96c6b9478171dff3deda662d5934f5f44 GREEN
    ......
    ......@@ -122,8 +122,11 @@ public class CopyPasteUtils {
    private static Resource getResourceOfClipBoardContent() {
    ClipboardObjectWithResource[] rawContent = getClipBoardContent();
    if(rawContent != null && rawContent.length > 0) {
    // [0]: rawContent has at least one element
    return rawContent[0].getResource();
    }
    return null;
    }
    ......
    ClipboardObjectWithResource.java 26feb0dc1a7a34166ff0b8a85860b598af24fab2 YELLOW
    ClipboardObjectWithResource.java e01926b68e75c1c0e0f17efaa8913fa9b578efa8 GREEN
    ......@@ -21,17 +21,17 @@ import org.eclipse.emf.ecore.resource.Resource;
    /**
    * The {@link ClipboardObjectWithResource} is a container that stores an {@link EObject} together
    * with its (original) resource. This is for example needed to not lose the reference to this
    * resource when moving the {@link EObject} via clipboard.
    * resource when moving the {@link EObject} via the clipboard.
    *
    * @author bergemann
    */
    public class ClipboardObjectWithResource {
    /** The element as main artifact of this container. */
    private EObject element = null;
    private EObject element;
    /** The original resource of the element. */
    private Resource resourceOfCurrentElement = null;
    private Resource resourceOfCurrentElement;
    /**
    * Constructor (The contained artifacts can also be changed later via getter/setter).
    ......@@ -39,7 +39,7 @@ public class ClipboardObjectWithResource {
    * @param element
    * The element that should be stored as main artifact inside this container object
    * @param originalResource
    * The resource of the element that should is stored in the container obejct
    * The resource of the element that should is stored in the container object
    */
    public ClipboardObjectWithResource(EObject element, Resource originalResource) {
    setElement(element);
    ......@@ -65,5 +65,4 @@ public class ClipboardObjectWithResource {
    public void setResource(Resource resourceOfElement) {
    this.resourceOfCurrentElement = resourceOfElement;
    }
    }
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment