[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.m2m] Re: [ATL] ResourceFactory

Hi Eric,

Eric MAES a écrit :
Hi Hugo,

Hugo Bruneliere wrote:

Eric MAES a écrit :
Is it possible to specify the use of a ResourceFactory that is different from the XMIResourceFactoryImpl ?

In my case, it is necessary to override the ResourceFactory.createResource method in order to specify the use of XMLResource.OPTION_EXTENDED_META_DATA...


The ResourceSet used by the ATL EMF model handler is currently statically declared and initialized in the ASMEMFModel class (org.eclipse.m2m.atl.drivers.emf4atl plugin).

Basically, the XMIResourceFactoryImpl is used for every resources but you can look at the "init()" method in order to add more specific ResourceFactories to the ResourceSet if needed.

Thanks for your answer,

The acces to the init() Method is not available.
Does it mean that I have to create a specific ASMMyMetemodelModel class and the related ASMMyMetemodelModelElement and AtlMyMetamodelModelHandler ?



It's up to you either to:
* directly modify the already existing generic EMF Model Handler (not recommended)
* create a new model handler which may specialize the existing EMF Model Handler
* The classes you need to implement have to extend (directly or indirectly): AtlModelHandler, ASMModel and ASMModelElement


Best regards,

Hugo

--
--------------------------------------------------------
Hugo Bruneliere - R&D Engineer
ATLAS Group (INRIA & LINA) - University of Nantes
2, rue de la Houssiniere
44322 Nantes Cedex 3 - France
office +33 2 51 12 58 10 /\ cell.+33 6 07 42 45 30
EMail: Hugo.Bruneliere@xxxxxxxxxxxxxx
http://www.sciences.univ-nantes.fr/lina/atl/
--------------------------------------------------------