Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Hawk » Indexing custom EMF Resources(Index EMF resources for wich a custom Resource and Resource factory exist)
Indexing custom EMF Resources [message #1814744] Tue, 17 September 2019 11:03 Go to next message
Horacio Hoyos is currently offline Horacio HoyosFriend
Messages: 210
Registered: October 2009
Location: UK
Senior Member

We generated the code for a metamodel and also use a custom Resource and ResourceFactory. How can we tell hawk to use the factory when scanning a git repository so it knows how to load our models?

I am guessing this has to be done from Java (as opposed to the UI).


Horacio Hoyos Rodriguez
Epsilon Committer
Research Assistant
University Of York
Re: Indexing custom EMF Resources [message #1815103 is a reply to message #1814744] Wed, 25 September 2019 13:12 Go to previous messageGo to next message
Horacio Hoyos is currently offline Horacio HoyosFriend
Messages: 210
Registered: October 2009
Location: UK
Senior Member

Figured it out; I have to implement a custom IModelResourceFactory (and possibly a custom IMetaModelResourceFactory) than can understand my models. Since my models are EMF, I had to create a ResourceSet and add the appropriate ResourceFactory implementations to handle them.

Horacio Hoyos Rodriguez
Epsilon Committer
Research Assistant
University Of York
Re: Indexing custom EMF Resources [message #1815175 is a reply to message #1815103] Thu, 26 September 2019 19:18 Go to previous message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 525
Registered: January 2010
Location: Birmingham, UK
Senior Member

Exactly - Hawk supports new model types through IModelResourceFactory implementations, and new metamodel types through IMetaModelResourceFactory implementations. If you have an EMF-based model that is not XMI-based, you can reuse the existing EMFMetaModelResourceFactory, but use a different EMF ResourceFactory.

We have examples of plugin that do something similar to this : the UMLModelResourceFactory and the BPMNMetaModelResourceFactory. Hopefully they serve as good starting points. Let me know if you run into any issues!
Previous Topic:Suggestion for model comparison
Next Topic:Making queries programatically
Goto Forum:
  


Current Time: Sat Feb 29 13:47:26 GMT 2020

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

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

Back to the top