[EMF Compare]Comparing own model (Dynamic Emf) [message #609705] |
Thu, 13 September 2007 00:12 |
Eclipse User |
|
|
|
Originally posted by: the_chris_2002.web.de
Hi,
i want to compare my own datastructure with EMF Compare. Therefore i`ve
written a converter which converts my own datastructure to an EObject. Here
is a snippet:
EPackage pack = EcoreFactory.eINSTANCE.createEPackage();
xdmPackage.setName(model.getRoot().getName());
EPackage firstChild = EcoreFactory.eINSTANCE.createEPackage();
firstChild.setName(model.getRoot().getfirstChild().getName() );
pack.getESubpackages().add(firstChild);
return pack;
Then i call the matching engine.
final MatchModel match = new DifferencesServices().modelMatch(model1,
model2, new NullProgressMonitor());
That will result in an NullpointerException, because their is no resource
binded to the EObject. I didnt find a way to add a resource to an EObject.
How do I do this? And a more important question is, will this work in the
end or do I have an fatal mistake in my logic?
regards,
ChrisW
|
|
|
Powered by
FUDForum. Page generated in 0.03487 seconds