Thank you for your fast answer. You are completely right 😃
Best regards,
Florian
Von: henshin-user-bounces@xxxxxxxxxxx <henshin-user-bounces@xxxxxxxxxxx> Im Auftrag von Zschaler, Steffen
Gesendet: Dienstag, 28. August 2018 11:55
An: Henshin Project user discussions <henshin-user@xxxxxxxxxxx>
Betreff: 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.
Steffen
Hi all,
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.
Best regards,
Florian