|Re: [henshin-user] Problem accessing single nodes of a matchinhenshin|
Youâre using the wrong factory J The factory youâre after, is probably a simple XMIResourceFactory, which would typically be registered against a â*â extension catchall.
Dr. rer. nat. Steffen Zschaler AHEA
King's College London
Department of Informatics
Phone +44 (020) 7848 1513
after I have continued with my project and started to learn how to use Sirius, I face another, for you most probably trivial problem.
I created a model with Sirius with a custom ending (for example .basicfamily from the Sirius tutorial) but I canât find a way, to use this model with Henshin.
I copied the model into a project in the first instance of eclipse. There I try to load it with the following line:
EGraph graph = new EGraphImpl(resourceSet.getResource("example.basicfamily"));
But this throws the exception:
Cannot create a resource for 'example.basicfamily'; a registered resource factory is needed
Through some searching I learned, that I have to load the resource factory mentioned in the plugin.xml from the edit project. So I added the following line before the instantiation of the EGraph:
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("basicfamily", new org.eclipse.sirius.sample.basicfamily.provider.BasicfamilyItemProviderAdapterFactory());
This results in another exception:
org.eclipse.sirius.sample.basicfamily.provider.BasicfamilyItemProviderAdapterFactory cannot be cast to org.eclipse.emf.ecore.resource.Resource$Factory
Sadly I have no idea how to solve this problem.