|Re: compare two xml models? [message #926058 is a reply to message #925245]
||Fri, 28 September 2012 09:07
| Kosala Yapa
Registered: September 2010
File file1 = new File("EMFModelA.ecore");
File file2 = new File("EMFModelB.ecore");
//register XMI resource factory for all other extensions
ResourceSet resourceSet = new ResourceSetImpl();
EObject model1 = ModelUtils.load(file1,resourceSet);
EObject model2 = ModelUtils.load(file2,resourceSet);
// MatchModel match = MatchService.doMatch(model1, model2, Collections.<String, Object> emptyMap());
MatchModel match = MatchService.doContentMatch(model1, model2, Collections.<String, Object> emptyMap());
//matching engine and matching
GenericMatchEngine eng = new GenericMatchEngine();
match = eng.contentMatch(model1, model2, Collections.<String, Object> emptyMap());
DiffModel diff = DiffService.doDiff(match);
Iterator<DiffElement> it = diff.getDifferences().iterator();
|Re: compare two xml models? [message #1006632 is a reply to message #1006507]
||Fri, 01 February 2013 09:32
| Laurent Goubet
Registered: July 2009
Please elaborate upon what you are trying to achieve.
All you should have to do is install the already built library. Whether you want EMF Compare to be usable to compare EMF models in your Eclipse, you want to develop an Eclipse plug-in that augments or makes use of EMF Compare or you wish to use EMF Compare from your standalone application.
Cloning the git repository containing the source code of EMF Compare is only necessary if you wish to develop patches or contributions to EMF Compare.
Follow the Installation instructions in order to install EMF Compare in Eclipse. Once done, the jars will simply be available to you. The will be located in your Eclipse "<installation directory>/plugins" folders ... but that is only relevant if you wish to develop a standalone application. Otherwise you'll never have to meddle with their location on disk.
Powered by FUDForum
. Page generated in 0.05463 seconds