Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMF Compare]Comparing own model (Dynamic Emf)
[EMF Compare]Comparing own model (Dynamic Emf) [message #609705] Thu, 13 September 2007 00:12
Eclipse UserFriend
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
Previous Topic:[CDO][0.8.0] Accessing more directly the data
Next Topic:[CDO][0.8.0] Accessing more directly the data
Goto Forum:
  


Current Time: Sat Nov 09 05:27:35 GMT 2024

Powered by FUDForum. Page generated in 0.03487 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top