Comparing UML models using a UMLPostProcessor [message #1440447] |
Wed, 08 October 2014 07:27  |
Eclipse User |
|
|
|
Hi,
I'm trying to diff to UML models using the UMLPostProcessor but for some reason I don't get any differences with the post processor. If i remove it a get a lot.
I'm using the following code.
ResourceSet set1 = new ResourceSetImpl();
ResourceSet set2 = new ResourceSetImpl();
EObject eoBj1 = loadModel1(set1,"Model1.uml");
EObject eoBj2 = loadModel2(set2,"Model2.emx");
IPostProcessor.Descriptor.Registry<String> ppRegistry = new PostProcessorDescriptorRegistryImpl<String>();
BasicPostProcessorDescriptorImpl basicPostProcessorDescriptorImpl = new BasicPostProcessorDescriptorImpl(new UMLPostProcessor(), Pattern.compile("http://www.eclipse.org/uml2/\\d.0.0/UML"), null);
ppRegistry.put("UMLPostProcessor", basicPostProcessorDescriptorImpl);
IComparisonScope scope = new DefaultComparisonScope(set1, set2,null);
Comparison comparison = EMFCompare.builder().setPostProcessorRegistry(ppRegistry).build().compare(scope);
List<Diff> differences = comparison.getDifferences();
I run this in Mars M2.
/Patrik
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.07130 seconds