Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 313135 - CopyingEpatchApplier throw IllegalArgumentException with multiple models
Summary: CopyingEpatchApplier throw IllegalArgumentException with multiple models
Status: CLOSED WONTFIX
Alias: None
Product: EMFCompare
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: EMF Compare CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-17 10:02 EDT by Simon Goodall CLA
Modified: 2011-08-09 05:54 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Goodall CLA 2010-05-17 10:02:21 EDT
Build Identifier: 20100218-1602

I have generated an Epatch from a ResourceSet containing two different model based on different underlying ecore models.

When trying to apply the patch using the CopyingEpatchApplier class I get an IllegalArgumentException claiming my feature is not found.

This is caused by the CopyingEpatchApplier.matchResource(NamedResource,Resource) method trying to find a matching resource for the object. It results in trying to find the object with a feature from ecore model A in ecore model B which of course results in it unable to find the feature. Unfortunately this issue is not caught leading to the patch process to abort.

Reproducible: Always

Steps to Reproduce:
1. Create two different ecore models
2. Create an instance of each of the ecore models
3. Load both into a single ResourceSet
4. Create a EpatchRecorder with the resource set
5. Make some changes to the models
6. Generate the patch from the recorder
7. Create an instance of CopyingEpatchApplier, passing in patch, resourceset and Right_to_left mode
8. IllegalArgumentException is thrown.
Comment 1 Laurent Goubet CLA 2011-08-09 05:54:15 EDT
EPatch was a contribution from an external contributor which stopped
maintaining its work. It is now deprecated in favor of the MPatch plugins.